Add safe request timeout for running actions manager #1080
Workflow file for this run
This file contains 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: Create OCI image | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
permissions: read-all | |
jobs: | |
publish-image: | |
strategy: | |
fail-fast: false | |
matrix: | |
image: [image, nativelink-worker-lre-cc] | |
name: Publish ${{ matrix.image }} | |
runs-on: large-ubuntu-22.04 | |
permissions: | |
packages: write | |
id-token: write | |
security-events: write | |
steps: | |
- name: Checkout | |
uses: >- # v4.1.1 | |
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Install Nix | |
uses: >- # v9 | |
DeterminateSystems/nix-installer-action@cd46bde16ab981b0a7b2dce0574509104543276e | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
nix-installer-tag: v0.16.1 | |
- name: Cache Nix derivations | |
uses: >- # Custom commit, last pinned at 2024-03-03. | |
DeterminateSystems/magic-nix-cache-action@742d8701e54851d2136f71b61d31382a4f4d0788 | |
- name: Test image | |
run: | | |
nix run .#local-image-test ${{ matrix.image }} | |
- name: Upload image | |
run: | | |
nix run .#publish-ghcr ${{ matrix.image }} | |
env: | |
GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
GHCR_USERNAME: ${{ github.actor }} | |
GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
if: github.ref == 'refs/heads/main' | |
- name: Upload trivy scan results to GitHub Security tab | |
uses: >- # v2.16.3 | |
github/codeql-action/upload-sarif@592977e6ae857384aa79bb31e7a1d62d63449ec5 | |
with: | |
sarif_file: 'trivy-results.sarif' | |
if: github.ref == 'refs/heads/main' |