From 8c1a7941eadfdcef6365993cf35c75acd6512fda Mon Sep 17 00:00:00 2001 From: Hironsan Date: Fri, 9 Sep 2022 13:28:31 +0900 Subject: [PATCH] Update publish-image workflow --- .github/workflows/publish-image.yml | 36 +++++++++++++---------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/publish-image.yml b/.github/workflows/publish-image.yml index f989c554..0ed945c7 100644 --- a/.github/workflows/publish-image.yml +++ b/.github/workflows/publish-image.yml @@ -4,8 +4,6 @@ on: schedule: - cron: '0 10 * * *' # everyday at 10am push: - branches: - - master tags: - 'v*.*.*' @@ -13,36 +11,34 @@ jobs: docker: runs-on: ubuntu-latest steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Docker meta + - name: Checkout + uses: actions/checkout@v3 + + - name: Docker meta id: docker_meta uses: crazy-max/ghaction-docker-meta@v1 with: images: doccano/doccano - tag-sha: true tag-semver: | {{version}} {{major}}.{{minor}} - - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub if: github.event_name != 'pull_request' - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build and push + + - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: context: . file: ./docker/Dockerfile