build(deps): bump actions/checkout from 5.0.0 to 6.0.0 #875
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: wit-deps | |
| on: | |
| pull_request: | |
| push: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-bin: | |
| strategy: | |
| matrix: | |
| config: | |
| - target: aarch64-unknown-linux-musl | |
| install-path: /bin/wit-deps | |
| test-bin: | | |
| nix profile install --inputs-from . 'nixpkgs-unstable#qemu' | |
| qemu-aarch64 ./result/bin/wit-deps --version | |
| test-oci: docker load < ./result | |
| # TODO: Run aarch64 binary within OCI | |
| - target: aarch64-apple-darwin | |
| install-path: /bin/wit-deps | |
| test-bin: file ./result/bin/wit-deps | |
| test-oci: docker load < ./result | |
| - target: armv7-unknown-linux-musleabihf | |
| install-path: /bin/wit-deps | |
| test-bin: | | |
| nix profile install --inputs-from . 'nixpkgs-unstable#qemu' | |
| qemu-arm ./result/bin/wit-deps --version | |
| test-oci: docker load < ./result | |
| # TODO: Run armv7 binary within OCI | |
| - target: x86_64-apple-darwin | |
| install-path: /bin/wit-deps | |
| test-bin: file ./result/bin/wit-deps | |
| test-oci: docker load < ./result | |
| - target: x86_64-pc-windows-gnu | |
| install-path: /bin/wit-deps.exe | |
| test-bin: | | |
| nix profile install --inputs-from . 'nixpkgs-unstable#wine64' | |
| wine64 ./result/bin/wit-deps.exe --version | |
| test-oci: docker load < ./result | |
| # TODO: Run windows binary within OCI | |
| - target: x86_64-unknown-linux-musl | |
| install-path: /bin/wit-deps | |
| test-bin: ./result/bin/wit-deps --version | |
| test-oci: | | |
| docker load < ./result | |
| docker run --rm wit-deps:$(nix eval --raw .#wit-deps-x86_64-unknown-linux-musl-oci.imageTag) wit-deps --version | |
| name: wit-deps-${{ matrix.config.target }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: ./.github/actions/install-nix | |
| with: | |
| cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - uses: ./.github/actions/build-nix | |
| with: | |
| package: wit-deps-${{ matrix.config.target }} | |
| install-path: ${{ matrix.config.install-path }} | |
| - run: ${{ matrix.config.test-bin }} | |
| - uses: ./.github/actions/build-nix | |
| with: | |
| package: wit-deps-${{ matrix.config.target }}-oci | |
| - run: ${{ matrix.config.test-oci }} | |
| build-lipo: | |
| name: wit-deps-universal-darwin | |
| needs: build-bin | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-aarch64-apple-darwin | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-apple-darwin | |
| - run: chmod +x ./wit-deps-aarch64-apple-darwin | |
| - run: ./wit-deps-aarch64-apple-darwin --version | |
| - run: lipo -create ./wit-deps-aarch64-apple-darwin ./wit-deps-x86_64-apple-darwin -output ./wit-deps-universal-darwin | |
| - run: chmod +x ./wit-deps-universal-darwin | |
| - run: ./wit-deps-universal-darwin --version | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: wit-deps-universal-darwin | |
| path: wit-deps-universal-darwin | |
| if-no-files-found: error | |
| cargo: | |
| strategy: | |
| matrix: | |
| check: | |
| - audit | |
| - fmt | |
| - clippy | |
| - nextest | |
| name: cargo ${{ matrix.check }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: ./.github/actions/install-nix | |
| with: | |
| cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: nix build -L .#checks.x86_64-linux.${{ matrix.check }} | |
| build-doc: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: ./.github/actions/install-nix | |
| with: | |
| cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - run: nix build -L .#checks.x86_64-linux.doc | |
| - run: cp --no-preserve=mode -R ./result/share/doc ./doc | |
| - run: rm -f doc/.lock | |
| - name: Create `.nojekyll` | |
| run: touch doc/.nojekyll | |
| - name: Write `index.html` | |
| run: | | |
| cat <<EOF > doc/index.html | |
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <title>Redirecting to wit_deps/index.html</title> | |
| <meta http-equiv="refresh" content="0; URL=wit_deps/index.html"> | |
| <link rel="canonical" href="https://${{ github.repository_owner }}.github.io/wit-deps/wit_deps/index.html"> | |
| EOF | |
| - uses: actions/[email protected] | |
| with: | |
| path: doc | |
| deploy-doc: | |
| runs-on: ubuntu-24.04 | |
| needs: build-doc | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| steps: | |
| - uses: actions/[email protected] | |
| id: deployment | |
| oci: | |
| runs-on: ubuntu-24.04 | |
| if: ${{ github.event_name != 'pull_request' }} | |
| needs: build-bin | |
| permissions: | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1 | |
| - uses: ./.github/actions/install-nix | |
| with: | |
| cachixAuthToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
| - name: Extract tag context | |
| id: ctx | |
| run: | | |
| echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT" | |
| echo "sha_short=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | |
| version=${GITHUB_REF_NAME#v} | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| echo "version is ${version}" | |
| if [[ $version == *"-"* ]]; then | |
| echo "version ${version} is a pre-release" | |
| echo "prerelease=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install `skopeo` | |
| run: nix profile install --inputs-from . 'nixpkgs-unstable#skopeo' | |
| - name: Build image | |
| run: nix build -L .#wit-deps-oci | |
| - name: Test image | |
| run: | | |
| skopeo copy oci-archive:./result docker-daemon:wit-deps:test | |
| docker run --rm wit-deps:test wit-deps --version | |
| - name: Push commit rev tag | |
| if: startswith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' | |
| run: | | |
| skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ github.sha }} | |
| skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ steps.ctx.outputs.sha_short }} | |
| docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ github.sha }} wit-deps --version | |
| docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ steps.ctx.outputs.sha_short }} wit-deps --version | |
| - name: Push version tag | |
| if: startswith(github.ref, 'refs/tags/v') | |
| run: | | |
| skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ steps.ctx.outputs.version }} | |
| docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:${{ steps.ctx.outputs.version }} wit-deps --version | |
| - name: Push `latest` tag | |
| if: startswith(github.ref, 'refs/tags/v') && !steps.ctx.outputs.prerelease | |
| run: | | |
| skopeo copy --all oci-archive:./result docker://ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:latest | |
| docker run --rm ghcr.io/${{ steps.ctx.outputs.owner }}/wit-deps:latest wit-deps --version | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: | |
| - build-bin | |
| - build-doc | |
| - build-lipo | |
| - cargo | |
| - oci | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/[email protected] | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-aarch64-apple-darwin | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-aarch64-unknown-linux-musl | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-armv7-unknown-linux-musleabihf | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-universal-darwin | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-apple-darwin | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-pc-windows-gnu | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-unknown-linux-musl | |
| - run: chmod +x ./wit-deps-* | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-aarch64-apple-darwin-oci | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-aarch64-unknown-linux-musl-oci | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-armv7-unknown-linux-musleabihf-oci | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-pc-windows-gnu-oci | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-apple-darwin-oci | |
| - uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0 | |
| with: | |
| name: wit-deps-x86_64-unknown-linux-musl-oci | |
| - uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 | |
| with: | |
| draft: true | |
| prerelease: true | |
| generate_release_notes: true | |
| files: | | |
| wit-deps-aarch64-apple-darwin | |
| wit-deps-aarch64-apple-darwin-oci | |
| wit-deps-aarch64-unknown-linux-musl | |
| wit-deps-aarch64-unknown-linux-musl-oci | |
| wit-deps-armv7-unknown-linux-musleabihf | |
| wit-deps-armv7-unknown-linux-musleabihf-oci | |
| wit-deps-universal-darwin | |
| wit-deps-x86_64-apple-darwin | |
| wit-deps-x86_64-apple-darwin-oci | |
| wit-deps-x86_64-pc-windows-gnu | |
| wit-deps-x86_64-pc-windows-gnu-oci | |
| wit-deps-x86_64-unknown-linux-musl | |
| wit-deps-x86_64-unknown-linux-musl-oci |