Support k8s 1.34: update tools and container image #105
Workflow file for this run
This file contains hidden or 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: "Build mysqld exporter container" | |
| on: | |
| pull_request: | |
| paths: | |
| - "containers/mysqld_exporter/**" | |
| - ".github/workflows/build-mysqld-exporter-container.yaml" | |
| - "!**.md" | |
| push: | |
| branches: | |
| - 'main' | |
| paths: | |
| - "containers/mysqld_exporter/**" | |
| - ".github/workflows/build-mysqld-exporter-container.yaml" | |
| - "!**.md" | |
| jobs: | |
| build: | |
| runs-on: ${{ vars.IMAGE_BUILD_RUNNER || 'ubuntu-22.04' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: docker/setup-qemu-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Check TAG file | |
| working-directory: containers | |
| run: | | |
| result="$(./tag_exists moco/mysqld_exporter mysqld_exporter)" | |
| if [ "$result" = ok ]; then | |
| exit 0 | |
| fi | |
| echo "TAG=$(cat ./mysqld_exporter/TAG)" >> $GITHUB_ENV | |
| - uses: docker/build-push-action@v5 | |
| if: env.TAG != null | |
| with: | |
| context: containers/mysqld_exporter/. | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.ref == 'refs/heads/main' }} | |
| tags: ghcr.io/cybozu-go/moco/mysqld_exporter:${{ env.TAG }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max |