-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,28 +21,42 @@ jobs: | |
cd config/release | ||
kustomize edit set image fluxcd/notification-controller=fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }} | ||
kustomize build . > notification-controller.yaml | ||
- uses: crazy-max/ghaction-docker-buildx@v1 | ||
- name: Publish image | ||
run: | | ||
echo "${{ secrets.DOCKER_FLUXCD_PASSWORD }}" | docker login --username fluxcdbot --password-stdin | ||
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io --username fluxcdbot --password-stdin | ||
docker buildx build --platform "linux/amd64" \ | ||
--output "type=image,push=true" \ | ||
--build-arg "REVISION=${GITHUB_SHA}" \ | ||
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \ | ||
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ | ||
--tag "ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \ | ||
--tag "docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }}" \ | ||
--file Dockerfile . | ||
docker buildx build --platform "linux/arm64" \ | ||
--output "type=image,push=true" \ | ||
--build-arg "REVISION=${GITHUB_SHA}" \ | ||
--build-arg "VERSION=${{ steps.get_version.outputs.VERSION }}" \ | ||
--build-arg "BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \ | ||
--tag "ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }}" \ | ||
--file Dockerfile . | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@master | ||
with: | ||
platforms: all | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: fluxcdbot | ||
password: ${{ secrets.GHCR_TOKEN }} | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: fluxcdbot | ||
password: ${{ secrets.DOCKER_FLUXCD_PASSWORD }} | ||
- name: Publish amd64 image | ||
uses: docker/build-push-action@v2-build-push | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
tags: ghcr.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }},docker.io/fluxcd/notification-controller:${{ steps.get_version.outputs.VERSION }} | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
crazy-max
|
||
- name: Publish arm64 image | ||
uses: docker/build-push-action@v2-build-push | ||
with: | ||
push: ${{ github.event_name != 'pull_request' }} | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/arm64 | ||
tags: ghcr.io/fluxcd/notification-controller-arm64:${{ steps.get_version.outputs.VERSION }} | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@latest | ||
|
@stefanprodan If you want something more readable you can also use a newline-delimiter for
tags
: