only build static image if necessary #85
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker CI | |
on: | |
push: | |
branches: | |
- master | |
- staging | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Use Node.js 16.19.0 | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: 16.19.0 | |
# - run: npm run genrss | |
- uses: actions/checkout@v2 | |
- name: Push image to AppVenture registry | |
uses: docker/build-push-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: registry.nush.app | |
repository: appventure-website-v4 | |
tags: latest | |
path: . | |
build_args: STATIC_URL=https://large.nush.app | |
- name: Check if static files changed | |
uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
static: | |
- 'static-large/**' | |
- name: Push large static files image to AppVenture registry | |
uses: docker/build-push-action@v1 | |
if: steps.filter.outputs.static == 'true' | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
registry: registry.nush.app | |
repository: appventure-website-v4 | |
tags: static-latest | |
path: ./static-large |