diff options
| author | jannfis <jann@mistrust.net> | 2022-01-10 17:10:44 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-10 17:10:44 +0100 |
| commit | bf79b9da9328e7f5d2b8254bd32c01637541243a (patch) | |
| tree | 0413f488ca3da33d7abbc99c90ad6ade25535dfb /.github/workflows/image.yaml | |
| parent | 111fbe013a036ee584d07b06e0b8154fd7c262b0 (diff) | |
chore: Multi-arch distribution (#339)
* chore: Multi-arch distribution
Signed-off-by: jannfis <jann@mistrust.net>
* Sync
Signed-off-by: jannfis <jann@mistrust.net>
* Update Makefile for multi-arch builds
Signed-off-by: jannfis <jann@mistrust.net>
* Add image workflow
Signed-off-by: jannfis <jann@mistrust.net>
* Fix repository name
Signed-off-by: jannfis <jann@mistrust.net>
* Fix script
Signed-off-by: jannfis <jann@mistrust.net>
* Fix
Signed-off-by: jannfis <jann@mistrust.net>
* Fix paths
Signed-off-by: jannfis <jann@mistrust.net>
* Fix script
Signed-off-by: jannfis <jann@mistrust.net>
* Disable spell checking for Makefile
Signed-off-by: jannfis <jann@mistrust.net>
* Always pull dependency images
Signed-off-by: jannfis <jann@mistrust.net>
Diffstat (limited to '.github/workflows/image.yaml')
| -rw-r--r-- | .github/workflows/image.yaml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml new file mode 100644 index 0000000..5b8e14e --- /dev/null +++ b/.github/workflows/image.yaml @@ -0,0 +1,47 @@ +name: Build and push image + +on: + push: + branches: + - master + pull_request: + branches: + - master + types: [ labeled, unlabeled, opened, synchronize, reopened ] + +jobs: + build_image: + if: github.repository == 'argoproj-labs/argocd-image-updater' + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + path: argocd-image-updater + - name: Setup qemu + uses: docker/setup-qemu-action@v1 + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v1 + - name: Build and possibly push image + run: | + set -ex + MULTIARCH=no + PUSH=no + if [[ "${{ github.event_name }}" == "push" ]]; then + MULTIARCH=yes + PUSH=yes + elif [[ "${{ contains(github.event.pull_request.labels.*.name, 'test-arm-image') }}" == "true" ]]; then + MULTIARCH=yes + fi + if [[ "${PUSH}" == "yes" ]]; then + docker login --username "${DOCKER_USERNAME}" --password "${DOCKER_TOKEN}" quay.io + fi + if [[ "${MULTIARCH}" = "yes" ]]; then + IMAGE_PUSH=${PUSH} make multiarch-image + else + make image + fi + working-directory: argocd-image-updater + env: + DOCKER_USERNAME: ${{ secrets.QUAY_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.QUAY_TOKEN }}
\ No newline at end of file |
