Skip to content

Update cloud-provider-kind image tag #2

Update cloud-provider-kind image tag

Update cloud-provider-kind image tag #2

name: Build and Push
on:
push:
branches:
- 'main'
paths:
- '.devcontainer/base/**'
- '.devcontainer/cloud-provider-kind/**'
env:
CONTAINER_NAME: 'quay.io/kubermatic-labs/devcontainers'
jobs:
updated_images:
runs-on: ubuntu-latest
outputs:
applications: ${{ steps.filter.outputs.changes }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
base: '.devcontainer/base/**'
cloud-provider-kind: '.devcontainer/cloud-provider-kind/**'
generate_short_sha:
runs-on: ubuntu-latest
outputs:
sha: ${{ steps.short-sha.outputs.sha }}
steps:
-
uses: actions/checkout@v4
-
uses: benjlevesque/[email protected]
id: short-sha
build:
runs-on: ubuntu-latest
needs: [updated_images, generate_short_sha]
strategy:
matrix:
application: ${{ fromJSON(needs.updated_images.outputs.applications) }}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Google Artifact Registry
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
-
name: Build and Push
uses: docker/build-push-action@v5
with:
push: true
context: ./.devcontainer/${{ matrix.application }}
file: ./.devcontainer/${{ matrix.application }}/Dockerfile
platforms: linux/arm64,linux/amd64
tags: |
${{ env.CONTAINER_NAME }}:${{ matrix.application }}-${{ needs.generate_short_sha.outputs.sha }}
${{ env.CONTAINER_NAME }}:${{ matrix.application }}-latest