From 2447310f918467e4674c7a8e3e17da76a20ee49c Mon Sep 17 00:00:00 2001 From: eyedeekay Date: Wed, 18 Sep 2024 22:45:36 -0400 Subject: [PATCH] CI: add workflow to also build tagged docker images --- .github/workflows/docker.yml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 22600a7ef3..06e7b740b6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,27 +1,36 @@ -name: ci +name: Dockerhub on: push: + tags: + - 'i2p-*.*.*' + branches: + - master jobs: docker: runs-on: ubuntu-latest steps: - - - name: Set up QEMU + - name: Set up QEMU uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - - - name: Login to Docker Hub + - name: Login to Docker Hub uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + - name: Set env + run: + apt-get install -y sed + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" | sed 's|master|latest|g' >> $GITHUB_ENV + - name: Build and push uses: docker/build-push-action@v6 with: push: true - tags: geti2p/i2p:latest + tags: geti2p/i2p:${{ env.RELEASE_VERSION }} + - name: Build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: geti2p/i2p.i2p:${{ env.RELEASE_VERSION }}