2024-09-16 17:35:30 +00:00
|
|
|
name: Create dokuwiki docker image
|
2024-09-16 12:54:30 +00:00
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
2024-09-17 12:02:42 +00:00
|
|
|
on:
|
|
|
|
push:
|
2024-09-17 12:16:54 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2024-09-17 12:02:42 +00:00
|
|
|
paths:
|
|
|
|
- '*Dockerfile'
|
2024-09-16 12:07:03 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-09-16 12:54:30 +00:00
|
|
|
Explore-Gitea-Actions:
|
2024-09-16 12:52:23 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-09-17 03:45:44 +00:00
|
|
|
env:
|
|
|
|
REGISTRY: registry.tuxnet.lan
|
|
|
|
IMAGE: web/dokuwiki
|
2024-09-16 12:07:03 +00:00
|
|
|
steps:
|
2024-09-16 13:06:06 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
|
|
|
|
- name: Set up Docker BuildX
|
|
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
with: # replace it with your local IP
|
|
|
|
config-inline: |
|
|
|
|
[registry."registry.tuxnet.lan"]
|
|
|
|
http = true
|
2024-09-16 17:22:03 +00:00
|
|
|
insecure = true
|
|
|
|
|
2024-09-17 02:58:38 +00:00
|
|
|
- name: Set Docker Version
|
|
|
|
id: get_version
|
|
|
|
run: |
|
2024-09-17 03:15:11 +00:00
|
|
|
DOCKER_VERSION=$(grep -oP '(?<=org.opencontainers.image.ref.name=").*\d' Dockerfile)
|
2024-09-17 02:58:38 +00:00
|
|
|
echo "Docker version: $DOCKER_VERSION"
|
|
|
|
echo "::set-output name=tag::$DOCKER_VERSION"
|
|
|
|
|
2024-09-16 17:22:03 +00:00
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
file: ./Dockerfile
|
|
|
|
platforms: |
|
2024-09-17 08:27:49 +00:00
|
|
|
linux/amd64
|
|
|
|
push: true
|
|
|
|
tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.get_version.outputs.tag }}
|