Update github action versions #26
Workflow file for this run
This file contains hidden or 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 build & publish | |
on: | |
pull_request: | |
push: | |
branches: [ master ] | |
# Allow workflow to be manually run from the GitHub UI | |
workflow_dispatch: | |
jobs: | |
docker-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Work out tags | |
id: container | |
run: | | |
TAGS=$(cat release | awk '{print "phpdockerio/readability-js-server:latest,phpdockerio/readability-js-server:" $1 ",phpdockerio/readability-js-server:" $2 ",phpdockerio/readability-js-server:" $3}') | |
echo "tags=${TAGS}" >> $GITHUB_OUTPUT | |
echo "Docker tags to build: ${TAGS}" | |
- name: Check if release version has been bumped | |
id: release_file_changed | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: | | |
release | |
- name: Build & push container image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.ref == 'refs/heads/master' && steps.release_file_changed.outputs.any_changed == 'true' }} | |
pull: true | |
tags: "${{ steps.container.outputs.tags }}" |