update os (e.g. alpine to 3.20) #71
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: buildx | |
on: | |
push: | |
branches: master | |
jobs: | |
buildx: | |
runs-on: ubuntu-latest | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Set up Docker Buildx | |
uses: crazy-max/ghaction-docker-buildx@v3 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- | |
name: Cache Docker layers | |
uses: actions/cache@v2 | |
id: cache | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- | |
name: Docker Buildx (build) | |
if: success() && github.event_name != 'pull_request' | |
run: | | |
docker buildx build \ | |
--cache-from "type=local,src=/tmp/.buildx-cache" \ | |
--cache-to "type=local,dest=/tmp/.buildx-cache" \ | |
--platform linux/arm64/v8,linux/amd64 \ | |
--output "type=image,push=false" \ | |
--tag neffets/drupal:10.2-apache \ | |
--tag neffets/drupal:latest \ | |
--file 10.2/php8.2/apache-bookworm/Dockerfile 10.2/php8.2/apache-bookworm/ | |
- | |
name: Docker Buildx (push) | |
if: success() && github.event_name != 'pull_request' | |
run: | | |
docker buildx build \ | |
--cache-from "type=local,src=/tmp/.buildx-cache" \ | |
--platform linux/arm64/v8,linux/amd64 \ | |
--output "type=image,push=true" \ | |
--tag neffets/drupal:10.2-apache \ | |
--tag neffets/drupal:latest \ | |
--file 10.2/php8.2/apache-bookworm/Dockerfile 10.2/php8.2/apache-bookworm/ | |
- | |
name: Inspect image | |
if: always() && github.event_name != 'pull_request' | |
run: | | |
docker buildx imagetools inspect neffets/drupal:latest | |