Allow re-trigger docker action on push to version branch

This commit is contained in:
Haishan 2021-06-05 23:09:27 +08:00
parent 966a6254d7
commit 25dbe5eff4
2 changed files with 4 additions and 4 deletions

View file

@ -86,18 +86,18 @@ jobs:
docker: docker:
needs: install needs: install
runs-on: ubuntu-20.04 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: steps:
- uses: actions/checkout@v2.3.4 - uses: actions/checkout@v2.3.4
- name: Docker meta - name: Docker meta
id: docker_meta id: docker_meta
uses: crazy-max/ghaction-docker-meta@v3.3.0 uses: docker/metadata-action@v3.3.0
with: with:
images: haishanh/yacd images: haishanh/yacd
- name: Set up QEMU - 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 - name: Set up Docker Buildx
id: buildx id: buildx

View file

@ -7,7 +7,7 @@ RUN yarn config set network-timeout 300000 \
&& yarn \ && yarn \
&& yarn build \ && yarn build \
# remove source maps - people like small image # remove source maps - people like small image
&& rm public/*.map && rm public/*.map || true
FROM nginx:alpine FROM nginx:alpine
RUN rm -rf /usr/share/nginx/html/* RUN rm -rf /usr/share/nginx/html/*