@@ -21,28 +21,42 @@ 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- - 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 .
24+ - name : Set up QEMU
25+ uses : docker/setup-qemu-action@master
26+ with :
27+ platforms : all
28+ - name : Set up Docker Buildx
29+ id : buildx
30+ uses : docker/setup-buildx-action@master
31+ - name : Login to GitHub Container Registry
32+ uses : docker/login-action@v1
33+ with :
34+ registry : ghcr.io
35+ username : fluxcdbot
36+ password : ${{ secrets.GHCR_TOKEN }}
37+ - name : Login to Docker Hub
38+ uses : docker/login-action@v1
39+ with :
40+ username : fluxcdbot
41+ password : ${{ secrets.DOCKER_FLUXCD_PASSWORD }}
42+ - name : Publish amd64 image
43+ uses : docker/build-push-action@v2-build-push
44+ with :
45+ push : ${{ github.event_name != 'pull_request' }}
46+ builder : ${{ steps.buildx.outputs.name }}
47+ context : .
48+ file : ./Dockerfile
49+ platforms : linux/amd64
50+ tags : ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }},docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}
51+ - name : Publish arm64 image
52+ uses : docker/build-push-action@v2-build-push
53+ with :
54+ push : ${{ github.event_name != 'pull_request' }}
55+ builder : ${{ steps.buildx.outputs.name }}
56+ context : .
57+ file : ./Dockerfile
58+ platforms : linux/arm64
59+ tags : ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }}
4660 - name : Create release
4761 id : create_release
4862 uses : actions/create-release@latest
0 commit comments