build(deps): bump actions/checkout from 6.0.1 to 6.0.2 #399
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 | |
| on: | |
| push: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [ amd64, arm64 ] | |
| runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-latest-arm' || 'ubuntu-latest' }} | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: gardenlinux/workflow-telemetry-action@9742ad16c70308bc8fa5f850d6ee6b22f2cce076 # v2 | |
| with: | |
| metric_frequency: 1 | |
| comment_on_pr: false | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: ./.github/actions/setup | |
| with: | |
| arch: ${{ matrix.arch }} | |
| - name: build builder container images | |
| run: | | |
| podman build --squash-all --arch ${{ matrix.arch }} --tag ghcr.io/${{ github.repository }}:${{ matrix.arch }}-${{ github.sha }} . | |
| - name: publish arch specific builder container image | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| podman login -u token -p ${{ github.token }} ghcr.io | |
| podman push ghcr.io/${{ github.repository }}:${{ matrix.arch }}-${{ github.sha }} | |
| push: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - uses: gardenlinux/workflow-telemetry-action@9742ad16c70308bc8fa5f850d6ee6b22f2cce076 # v2 | |
| with: | |
| metric_frequency: 1 | |
| comment_on_pr: false | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: publish builder container images | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| podman login -u token -p ${{ github.token }} ghcr.io | |
| podman manifest create ghcr.io/${{ github.repository }}:${{ github.sha }} | |
| podman manifest add ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:amd64-${{ github.sha }} | |
| podman manifest add ghcr.io/${{ github.repository }}:${{ github.sha }} ghcr.io/${{ github.repository }}:arm64-${{ github.sha }} | |
| podman push ghcr.io/${{ github.repository }}:${{ github.sha }} | |
| sed -i 's|container_image=localhost/builder|container_image=ghcr.io/${{ github.repository }}:${{ github.sha }}|' build | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: build | |
| path: build | |
| - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: build.config | |
| path: build.config | |
| # Run for new commits on the main branch | |
| release-latest: | |
| runs-on: ubuntu-latest | |
| needs: push | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: tag latest | |
| run: | | |
| git tag --force latest | |
| git push --force origin latest | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: build | |
| path: download | |
| - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: build.config | |
| path: download | |
| - name: create release | |
| run: | | |
| release="$(.github/workflows/release.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} create latest "Builder (latest)")" | |
| .github/workflows/release.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} upload "$release" download/build | |
| .github/workflows/release.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.repository }} upload "$release" download/build.config |