chore(deps): update ghcr.io/pingcap-qe/bases/pd-base docker tag to v1… #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Skaffold - release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**/Dockerfile" | |
- "**/*.Dockerfile" | |
- "**/skaffold.yaml" | |
- .github/workflows/release.yml | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
# JOB to run change detection | |
dockerfiles-changes: | |
name: detect changes for Dockerfiles. | |
runs-on: ubuntu-latest | |
# Required permissions | |
permissions: | |
contents: read | |
outputs: | |
# Expose matched filters as job 'packages' output variable | |
packages-prod-bases: ${{ steps.filter-product-bases.outputs.changes }} | |
packages-ci-bases: ${{ steps.filter-ci-bases.outputs.changes }} | |
packages-ci-utils: ${{ steps.filter-ci-utils.outputs.changes }} | |
steps: | |
- uses: actions/checkout@v4 | |
# For pull requests it's not necessary to checkout the code | |
- uses: dorny/paths-filter@v2 | |
id: filter-product-bases | |
with: | |
filters: | | |
bases: dockerfiles/bases/** | |
- uses: dorny/paths-filter@v2 | |
id: filter-ci-bases | |
with: | |
filters: | | |
base: dockerfiles/ci/base/** | |
release-build-base: dockerfiles/ci/release-build-base/** | |
- uses: dorny/paths-filter@v2 | |
id: filter-ci-utils | |
with: | |
filters: | | |
release-utils: dockerfiles/ci/release-utils/** | |
build-product-bases: | |
name: Skaffold release product base images | |
needs: dockerfiles-changes | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
no-use: ${{ fromJSON(needs.dockerfiles-changes.outputs.packages-prod-bases) }} | |
builder-profile: [local-docker] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup skaffold | |
run: | | |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | |
sudo install skaffold /usr/local/bin/ | |
- name: Cache layers | |
uses: actions/cache@v3 | |
with: | |
path: "~/.skaffold/cache" | |
key: skaffold-${{ hashFiles('**/cache') }} | |
restore-keys: | | |
skaffold- | |
- name: Build images | |
working-directory: dockerfiles/bases | |
run: | | |
skaffold build \ | |
--profile ${{ matrix.builder-profile }} \ | |
--default-repo ghcr.io/pingcap-qe/bases | |
build-ci-bases: | |
name: Skaffold release CI base images | |
needs: dockerfiles-changes | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
module: ${{ fromJSON(needs.dockerfiles-changes.outputs.packages-ci-bases) }} | |
go-profile: [go-1.21, go-1.20, go-1.19] | |
builder-profile: [local-docker] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup skaffold | |
run: | | |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | |
sudo install skaffold /usr/local/bin/ | |
- name: Cache layers | |
uses: actions/cache@v3 | |
with: | |
path: "~/.skaffold/cache" | |
key: skaffold-${{ hashFiles('**/cache') }} | |
restore-keys: | | |
skaffold- | |
- name: Build images | |
working-directory: dockerfiles/ci | |
run: | | |
skaffold build \ | |
--module ${{ matrix.module }} \ | |
--profile ${{ matrix.go-profile }},${{ matrix.builder-profile }} \ | |
--default-repo ghcr.io/pingcap-qe/ci | |
build-ci-utils: | |
name: Skaffold release CI util images | |
needs: dockerfiles-changes | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
strategy: | |
matrix: | |
no-use: ${{ fromJSON(needs.dockerfiles-changes.outputs.packages-ci-utils) }} | |
builder-profile: [local-docker] | |
platform: [linux/amd64, linux/arm64] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup skaffold | |
run: | | |
curl -Lo skaffold https://storage.googleapis.com/skaffold/releases/v2.8.0/skaffold-linux-amd64 && \ | |
sudo install skaffold /usr/local/bin/ | |
- name: Cache layers | |
uses: actions/cache@v3 | |
with: | |
path: "~/.skaffold/cache" | |
key: skaffold-${{ hashFiles('**/cache') }} | |
restore-keys: | | |
skaffold- | |
- name: Build images | |
working-directory: dockerfiles/ci | |
run: | | |
skaffold build \ | |
--module release-utils \ | |
--profile ${{ matrix.builder-profile }} \ | |
--default-repo ghcr.io/pingcap-qe/ci |