From 5b7e8a69a5fc7454637f128385617c24f861bc41 Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 4 Jan 2022 19:04:58 +0900 Subject: [PATCH 1/2] Revert "Deploy tags" This reverts commit d9a59f1b07e17e989383e3c79efde2d590564be4. --- .github/workflows/deploy-docker.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker.yaml index 39c9fb09..8ff8f7a4 100644 --- a/.github/workflows/deploy-docker.yaml +++ b/.github/workflows/deploy-docker.yaml @@ -4,8 +4,6 @@ on: push: branches: - 'main' - tags: - - '*' jobs: docker: @@ -17,12 +15,6 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Docker meta - id: meta - uses: docker/metadata-action@v3 - with: - images: plumeorg/plume - name: Login to DockerHub uses: docker/login-action@v1 @@ -35,4 +27,4 @@ jobs: uses: docker/build-push-action@v2 with: push: true - tags: ${{ steps.meta.outputs.tags == 'master' && 'latest' || steps.meta.outputs.tags }} + tags: plumeorg/plume:latest From b97c9d2165d041f1b2ba8ca0ad561087af25b30d Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Tue, 4 Jan 2022 19:07:47 +0900 Subject: [PATCH 2/2] Deploy Docker images with tags --- ...-docker.yaml => deploy-docker-latest.yaml} | 0 .github/workflows/deploy-docker-tag.yaml | 36 +++++++++++++++++++ 2 files changed, 36 insertions(+) rename .github/workflows/{deploy-docker.yaml => deploy-docker-latest.yaml} (100%) create mode 100644 .github/workflows/deploy-docker-tag.yaml diff --git a/.github/workflows/deploy-docker.yaml b/.github/workflows/deploy-docker-latest.yaml similarity index 100% rename from .github/workflows/deploy-docker.yaml rename to .github/workflows/deploy-docker-latest.yaml diff --git a/.github/workflows/deploy-docker-tag.yaml b/.github/workflows/deploy-docker-tag.yaml new file mode 100644 index 00000000..2be42eab --- /dev/null +++ b/.github/workflows/deploy-docker-tag.yaml @@ -0,0 +1,36 @@ +name: cd + +on: + push: + tags: + - *.*.* + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v1 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: plumeorg/plume + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: plumeorg/plume:v${{ steps.meta.outputs.tags }}