From 3f779fe766ade658f0d0142dbb1109d3b9b911fc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 15 Jun 2020 19:27:44 +0200 Subject: [PATCH] ci: use `gh-` prefix for auto-build docker images for easier cleanup --- .github/workflows/ci-cleanup.yml | 38 -------------------------------- .github/workflows/ci.yml | 12 +++++----- 2 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/ci-cleanup.yml diff --git a/.github/workflows/ci-cleanup.yml b/.github/workflows/ci-cleanup.yml deleted file mode 100644 index 0d24155b0..000000000 --- a/.github/workflows/ci-cleanup.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: passbook-ci-cleanup -on: - - delete - -jobs: - delete-server: - runs-on: ubuntu-latest - steps: - - name: Delete docker tag - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: curl - -u $DOCKER_USERNAME:$DOCKER_PASSWORD - -X "DELETE" - "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook/tags/${GITHUB_REF##*/}/" - delete-gatekeeper: - runs-on: ubuntu-latest - steps: - - name: Delete docker tag - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: curl - -u $DOCKER_USERNAME:$DOCKER_PASSWORD - -X "DELETE" - "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook-gatekeeper/tags/${GITHUB_REF##*/}/" - delete-static: - runs-on: ubuntu-latest - steps: - - name: Delete docker tag - env: - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - run: curl - -u $DOCKER_USERNAME:$DOCKER_PASSWORD - -X "DELETE" - "https://hub.docker.com/v2/repositories/$DOCKER_USERNAME/passbook-static/tags/${GITHUB_REF##*/}/" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbb0e4d62..14c689911 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,10 +146,10 @@ jobs: - name: Building Docker Image run: docker build --no-cache - -t beryju/passbook:${GITHUB_REF##*/} + -t beryju/passbook:gh-${GITHUB_REF##*/} -f Dockerfile . - name: Push Docker Container to Registry - run: docker push beryju/passbook:${GITHUB_REF##*/} + run: docker push beryju/passbook:gh-${GITHUB_REF##*/} build-gatekeeper: needs: - migrations @@ -167,10 +167,10 @@ jobs: cd gatekeeper docker build \ --no-cache \ - -t beryju/passbook-gatekeeper:${GITHUB_REF##*/} \ + -t beryju/passbook-gatekeeper:gh-${GITHUB_REF##*/} \ -f Dockerfile . - name: Push Docker Container to Registry - run: docker push beryju/passbook-gatekeeper:${GITHUB_REF##*/} + run: docker push beryju/passbook-gatekeeper:gh-${GITHUB_REF##*/} build-static: needs: - migrations @@ -196,7 +196,7 @@ jobs: run: docker build --no-cache --network=$(docker network ls | grep github | awk '{print $1}') - -t beryju/passbook-static:${GITHUB_REF##*/} + -t beryju/passbook-static:gh-${GITHUB_REF##*/} -f static.Dockerfile . - name: Push Docker Container to Registry - run: docker push beryju/passbook-static:${GITHUB_REF##*/} + run: docker push beryju/passbook-static:gh-${GITHUB_REF##*/}