@@ -21,20 +21,28 @@ jobs:
2121 cd config/release
2222 kustomize edit set image fluxcd/notification-controller=fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}
2323 kustomize build . > notification-controller.yaml
24- - name : Push image Docker Hub
25- uses : docker/build-push-action@v1
26- with :
27- username : ${{ secrets.DOCKER_FLUXCD_USER }}
28- password : ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
29- repository : fluxcd/notification-controller
30- tag_with_ref : true
31- - name : Push image to GHCR
32- uses : docker/build-push-action@v1
33- with :
34- username : fluxcdbot
35- password : ${{ secrets.GHCR_TOKEN }}
36- repository : ghcr.io/fluxcd/notification-controller
37- tag_with_ref : true
24+ - uses : crazy-max/ghaction-docker-buildx@v1
25+ - name : Publish image
26+ run : |
27+ echo "${{ secrets.DOCKER_FLUXCD_PASSWORD }}" | docker login --username fluxcdbot --password-stdin
28+ echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io --username fluxcdbot --password-stdin
29+
30+ docker buildx build --platform "linux/amd64" \
31+ --output "type=image,push=true" \
32+ --build-arg "REVISION=${GITHUB_SHA}" \
33+ --build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
34+ --build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
35+ --tag "ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
36+ --tag "docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \
37+ --file Dockerfile .
38+
39+ docker buildx build --platform "linux/arm64" \
40+ --output "type=image,push=true" \
41+ --build-arg "REVISION=${GITHUB_SHA}" \
42+ --build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \
43+ --build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
44+ --tag "ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }}" \
45+ --file Dockerfile .
3846 - name : Create release
3947 id : create_release
4048 uses : actions/create-release@latest
0 commit comments