Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ on:
branches:
- master

env:
PLATFORMS: linux/arm64/v8,linux/amd64

jobs:
# Build a docker image for a specific version and using a given target
build_and_push:
runs-on: ubuntu-latest

Expand All @@ -17,11 +19,11 @@ jobs:

steps:
- name: "Checkout Sourcecode"
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: "Set up Docker Buildx"
id: builder
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: "Append ARM buildx builder from AWS"
uses: baschny/append-buildx-action@v1
Expand All @@ -43,20 +45,25 @@ jobs:
run: make build HTTPD_VERSION=${{ matrix.httpd-version }}

- name: "Login to DockerHub"
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: "Docker push httpd-${{ matrix.httpd-version }}"
run: make build BUILDX_OPTIONS=--push HTTPD_VERSION=${{ matrix.httpd-version }}
- name: "Docker build and push"
uses: docker/build-push-action@v6
with:
context: .
tags: "croneu/phpapp-web:apache-${{ matrix.httpd-version }}"
platforms: ${{ env.PLATFORMS }}
push: true
cache-from: type=gha
cache-to: type=gha,mode=max

- name: "Update Docker Hub Description (croneu/phpapp-web)"
uses: peter-evans/dockerhub-description@v2
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
# Note: the "TOKEN" does not work for the docker hub API yet, see
# https://github.com/peter-evans/dockerhub-description/issues/10
password: ${{ secrets.DOCKERHUB_PASSWORD }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
repository: croneu/phpapp-web
short-description: ${{ github.event.repository.description }}