55 branches :
66 - master
77
8+ env :
9+ PLATFORMS : linux/arm64/v8,linux/amd64
10+
811jobs :
9- # Build a docker image for a specific version and using a given target
1012 build_and_push :
1113 runs-on : ubuntu-latest
1214
@@ -17,11 +19,11 @@ jobs:
1719
1820 steps :
1921 - name : " Checkout Sourcecode"
20- uses : actions/checkout@v2
22+ uses : actions/checkout@v4
2123
2224 - name : " Set up Docker Buildx"
2325 id : builder
24- uses : docker/setup-buildx-action@v1
26+ uses : docker/setup-buildx-action@v3
2527
2628 - name : " Append ARM buildx builder from AWS"
2729 uses : baschny/append-buildx-action@v1
@@ -43,20 +45,25 @@ jobs:
4345 run : make build HTTPD_VERSION=${{ matrix.httpd-version }}
4446
4547 - name : " Login to DockerHub"
46- uses : docker/login-action@v1
48+ uses : docker/login-action@v3
4749 with :
4850 username : ${{ secrets.DOCKERHUB_USERNAME }}
4951 password : ${{ secrets.DOCKERHUB_TOKEN }}
5052
51- - name : " Docker push httpd-${{ matrix.httpd-version }}"
52- run : make build BUILDX_OPTIONS=--push HTTPD_VERSION=${{ matrix.httpd-version }}
53+ - name : " Docker build and push"
54+ uses : docker/build-push-action@v6
55+ with :
56+ context : .
57+ tags : " croneu/phpapp-web:apache-${{ matrix.httpd-version }}"
58+ platforms : ${{ env.PLATFORMS }}
59+ push : true
60+ cache-from : type=gha
61+ cache-to : type=gha,mode=max
5362
5463 - name : " Update Docker Hub Description (croneu/phpapp-web)"
55- uses : peter-evans/dockerhub-description@v2
64+ uses : peter-evans/dockerhub-description@v4
5665 with :
5766 username : ${{ secrets.DOCKERHUB_USERNAME }}
58- # Note: the "TOKEN" does not work for the docker hub API yet, see
59- # https://github.com/peter-evans/dockerhub-description/issues/10
60- password : ${{ secrets.DOCKERHUB_PASSWORD }}
67+ password : ${{ secrets.DOCKERHUB_TOKEN }}
6168 repository : croneu/phpapp-web
6269 short-description : ${{ github.event.repository.description }}
0 commit comments