Add dummy sprints to handle course rearrangement (#37) #25
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: | |
| push: | |
| tags: | |
| - "v[0-9]+\\.[0-9]+\\.[0-9]+" | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # To create a release. | |
| contents: write | |
| # To push a docker image. | |
| packages: write | |
| # To push an attestation. | |
| attestations: write | |
| # Presumably used to log into the GitHub Container Registry, as per https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions. | |
| id-token: write | |
| container: | |
| image: rust:1.88.0-alpine | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install deps | |
| run: apk add docker gcc g++ | |
| - name: Build binaries | |
| # Copy file to rename for the release action | |
| run: cargo build --release && cp target/release/pr-metadata-validator pr-metadata-validator-musl-${{ github.ref_name }} | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
| - name: Build and push Docker image | |
| id: push | |
| uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| - name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true | |
| - name: Create release | |
| id: create_release | |
| uses: softprops/action-gh-release@v2.4.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| generate_release_notes: true | |
| tag_name: ${{ github.ref_name }} | |
| target_commitish: ${{ github.base_ref }} | |
| files: pr-metadata-validator-musl-${{ github.ref_name }} |