diff --git a/.github/workflows/cd.yml b/.github/workflows/cd-api.yml similarity index 71% rename from .github/workflows/cd.yml rename to .github/workflows/cd-api.yml index 64908d4eb44e..d54226518764 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd-api.yml @@ -16,11 +16,17 @@ name: CD on: push: branches: [master] + paths: + - .github/workflows/cd-api.yml + - modules/api + - modules/common + - hack/docker + - hack/gateway pull_request: branches: [ master ] # TODO: Remove before merging. create: tags: - - "v*.*.*" + - "api/v*.*.*" permissions: contents: read id-token: write @@ -29,7 +35,7 @@ env: TERM: xterm jobs: release: - name: Release + name: Release API runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -41,14 +47,9 @@ jobs: images: | ghcr.io/kubernetes/dashboard-api docker.io/kubernetesui/dashboard-api - ghcr.io/kubernetes/dashboard-auth - docker.io/kubernetesui/dashboard-auth - ghcr.io/kubernetes/dashboard-web - docker.io/kubernetesui/dashboard-web - ghcr.io/kubernetes/metrics-scraper - docker.io/kubernetesui/metrics-scraper tags: | type=semver,pattern={{version}} + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }} - uses: docker/setup-qemu-action@v3.0.0 - uses: docker/setup-buildx-action@v3.0.0 - uses: docker/login-action@v3.0.0 @@ -60,17 +61,9 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} -# - if: github.event_name == 'push' && contains(github.ref, 'master') - uses: docker/build-push-action@v5 with: - context: . - push: false # TODO - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} -# - if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v') - - uses: docker/build-push-action@v5 - with: - context: . + context: modules push: false # TODO tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}