From edec4cee2969889b614dd64d0c57349b275c1228 Mon Sep 17 00:00:00 2001 From: Marko Oldenburg Date: Tue, 17 Sep 2024 14:39:56 +0200 Subject: [PATCH] =?UTF-8?q?.gitea/workflows/build=5Fnopush.yml=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/build_nopush.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitea/workflows/build_nopush.yml diff --git a/.gitea/workflows/build_nopush.yml b/.gitea/workflows/build_nopush.yml new file mode 100644 index 0000000..fbc0160 --- /dev/null +++ b/.gitea/workflows/build_nopush.yml @@ -0,0 +1,46 @@ +name: Create dokuwiki docker image +run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀 +on: + push: + branches: + - devel + paths: + - '*Dockerfile' + +jobs: + Explore-Gitea-Actions: + runs-on: ubuntu-latest + env: + REGISTRY: registry.tuxnet.lan + IMAGE: web/dokuwiki + steps: + - 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 + insecure = true + + - name: Set Docker Version + id: get_version + run: | + DOCKER_VERSION=$(grep -oP '(?<=org.opencontainers.image.ref.name=").*\d' Dockerfile) + echo "Docker version: $DOCKER_VERSION" + echo "::set-output name=tag::$DOCKER_VERSION" + + - name: Build and push + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + platforms: | + linux/amd64 + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.get_version.outputs.tag }} \ No newline at end of file