From 25dbe5eff483bfdceec677b13ad4ec905c5fe566 Mon Sep 17 00:00:00 2001 From: Haishan Date: Sat, 5 Jun 2021 23:09:27 +0800 Subject: [PATCH] Allow re-trigger docker action on push to version branch --- .github/workflows/push.yml | 6 +++--- Dockerfile | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 91d3fc8..f5aa6f2 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -86,18 +86,18 @@ jobs: docker: needs: install runs-on: ubuntu-20.04 - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') + if: github.event_name == 'push' && (startsWith(github.event.ref, 'refs/tags/') || startsWith(github.event.ref, 'refs/heads/v0.')) steps: - uses: actions/checkout@v2.3.4 - name: Docker meta id: docker_meta - uses: crazy-max/ghaction-docker-meta@v3.3.0 + uses: docker/metadata-action@v3.3.0 with: images: haishanh/yacd - name: Set up QEMU - uses: docker/setup-qemu-action@v1.1.0 + uses: docker/setup-qemu-action@v1.2.0 - name: Set up Docker Buildx id: buildx diff --git a/Dockerfile b/Dockerfile index 89046c0..5b741d6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN yarn config set network-timeout 300000 \ && yarn \ && yarn build \ # remove source maps - people like small image - && rm public/*.map + && rm public/*.map || true FROM nginx:alpine RUN rm -rf /usr/share/nginx/html/*