display proper message for unsupported sites #14
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: Build and Push Docker Image | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
ignore-readme-only-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
run_build: ${{ steps.filter.outputs.run_build }} | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- id: filter | |
name: Check if README.md was updated | |
run: | | |
if git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -iqvE '^(readme.md)$' | |
then | |
echo "run_build=true" >> $GITHUB_OUTPUT | |
else | |
echo "run_build=false" >> $GITHUB_OUTPUT | |
fi | |
build-and-push: | |
needs: ignore-readme-only-changes | |
if: needs.ignore-readme-only-changes.outputs.run_build == 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: builder555 | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push multi-platform Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
push: true | |
tags: builder555/pricewatch:latest | |
platforms: linux/amd64,linux/arm64,linux/arm/v7 |