chore(deps): update cgr.dev/chainguard/wolfi-base:latest docker digest to 5743937 - autoclosed #665
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: release | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - next | |
| tags: | |
| - "*" | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| goreleaser: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| if: github.event_name != 'pull_request' | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6 | |
| with: | |
| go-version: 1.25.x | |
| - name: Set up QEMU | |
| id: qemu | |
| uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3 | |
| - name: Set up Docker Buildx | |
| id: buildx | |
| uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3 | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: install cosign | |
| uses: sigstore/cosign-installer@398d4b0eeef1380460a10c8013a76f728fb906ac # v3 | |
| - name: Setup Cosign | |
| run: | | |
| echo "${COSIGN_KEY}" > "$GITHUB_WORKSPACE/cosign.key" | |
| env: | |
| COSIGN_KEY: ${{ secrets.COSIGN_KEY }} | |
| - name: Set GoReleaser Default Args | |
| if: startsWith(github.ref, 'refs/tags/') == true | |
| run: | | |
| echo "GORELEASER_ARGS=" >> $GITHUB_ENV | |
| - name: Set GoReleaser Options for Branch | |
| if: startsWith(github.ref, 'refs/tags/') == false | |
| run: | | |
| echo "GORELEASER_ARGS=--snapshot" >> $GITHUB_ENV | |
| - name: Set GoReleaser Options for Renovate | |
| if: startsWith(github.ref, 'refs/heads/renovate') == true | |
| run: | | |
| echo "GORELEASER_ARGS=--snapshot --skip-publish" >> $GITHUB_ENV | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@5fdedb94abba051217030cc86d4523cf3f02243d # v4 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean ${{ env.GORELEASER_ARGS }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }} | |
| - name: Push Docker Images (for branches) | |
| if: github.ref == 'refs/heads/master' || github.event.pull_request.base.ref == 'master' | |
| run: | | |
| echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin | |
| docker images --format "{{.Repository}}:{{.Tag}}" | grep "${{ github.repository }}" | xargs -L1 docker push | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: releases | |
| path: | | |
| releases/default_windows_*/file_exporter.exe | |
| - id: version | |
| run: | | |
| echo "version=$(cat releases/metadata.json | jq -r '.version')" >> $GITHUB_OUTPUT | |
| echo "windows=$(cat releases/metadata.json | jq -r '.version | split("-") | if length == 1 then .[0] else ([.[0],.[1]] | join(".") | sub("rc"; "")) end')" >> $GITHUB_OUTPUT | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| windows-version: ${{ steps.version.outputs.windows }} | |
| msi: | |
| runs-on: windows-latest | |
| needs: | |
| - goreleaser | |
| strategy: | |
| matrix: | |
| arch: | |
| - amd64 | |
| - "386" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 | |
| - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5 | |
| with: | |
| name: releases | |
| path: releases | |
| - if: matrix.arch == 'amd64' | |
| run: .\package\windows\build.ps1 -PathToExecutable .\releases\default_windows_${{ matrix.arch }}_v1\file_exporter.exe -Version ${{ needs.goreleaser.outputs.version }} -WindowsVersion ${{ needs.goreleaser.outputs.windows-version }} -Arch ${{ matrix.arch }} | |
| shell: powershell | |
| - if: matrix.arch == '386' | |
| run: .\package\windows\build.ps1 -PathToExecutable .\releases\default_windows_${{ matrix.arch }}_sse2\file_exporter.exe -Version ${{ needs.goreleaser.outputs.version }} -WindowsVersion ${{ needs.goreleaser.outputs.windows-version }} -Arch ${{ matrix.arch }} | |
| shell: powershell | |
| - run: Move-Item .\package\windows\Output\file_exporter-${{ needs.goreleaser.outputs.version }}-${{ matrix.arch }}.msi .\releases\file_exporter_${{ needs.goreleaser.outputs.version }}_windows_${{ matrix.arch }}.msi | |
| shell: powershell | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: releases-windows-${{ matrix.arch }} | |
| path: releases/* | |
| - name: Upload binaries to release | |
| if: startsWith(github.ref, 'refs/tags/') == true | |
| uses: svenstaro/upload-release-action@81c65b7cd4de9b2570615ce3aad67a41de5b1a13 # v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: releases\file_exporter_${{ needs.goreleaser.outputs.version }}_windows_${{ matrix.arch }}.msi | |
| asset_name: file_exporter_${{ needs.goreleaser.outputs.version }}_windows_${{ matrix.arch }}.msi | |
| tag: ${{ github.ref }} | |
| overwrite: true |