|
1 |
| ---- |
2 |
| -name: Create OCI image |
3 |
| -on: |
4 |
| - pull_request: |
5 |
| - branches: |
6 |
| - - main |
7 |
| - push: |
8 |
| - branches: |
9 |
| - - main |
10 |
| - |
11 |
| -permissions: read-all |
12 |
| - |
13 |
| -concurrency: |
14 |
| - group: ${{ github.workflow }}-${{ github.ref }} |
15 |
| - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
16 |
| - |
17 |
| -jobs: |
18 |
| - publish-image: |
19 |
| - strategy: |
20 |
| - fail-fast: false |
21 |
| - matrix: |
22 |
| - image: [image, nativelink-worker-init, nativelink-worker-lre-cc] |
23 |
| - name: Publish ${{ matrix.image }} |
24 |
| - runs-on: ubuntu-22.04 |
25 |
| - permissions: |
26 |
| - packages: write |
27 |
| - id-token: write |
28 |
| - security-events: write |
29 |
| - timeout-minutes: 30 |
30 |
| - steps: |
31 |
| - |
32 |
| - - name: Checkout |
33 |
| - uses: >- # v4.1.1 |
34 |
| - actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
35 |
| -
|
36 |
| - - name: Install Nix |
37 |
| - uses: >- # v10 |
38 |
| - DeterminateSystems/nix-installer-action@de22e16c4711fca50c816cc9081563429d1cf563 |
39 |
| -
|
40 |
| - - name: Cache Nix derivations |
41 |
| - uses: >- # v4 |
42 |
| - DeterminateSystems/magic-nix-cache-action@fc6aaceb40b9845a02b91e059ec147e78d1b4e41 |
43 |
| -
|
44 |
| - - name: Test image |
45 |
| - run: | |
46 |
| - nix run .#local-image-test ${{ matrix.image }} |
47 |
| -
|
48 |
| - - name: Upload image |
49 |
| - run: | |
50 |
| - nix run .#publish-ghcr ${{ matrix.image }} |
51 |
| - env: |
52 |
| - GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }} |
53 |
| - GHCR_USERNAME: ${{ github.actor }} |
54 |
| - GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
55 |
| - if: github.ref == 'refs/heads/main' |
56 |
| - |
57 |
| - - name: Upload trivy scan results to GitHub Security tab |
58 |
| - uses: >- # v2.16.3 |
59 |
| - github/codeql-action/upload-sarif@592977e6ae857384aa79bb31e7a1d62d63449ec5 |
60 |
| - with: |
61 |
| - sarif_file: 'trivy-results.sarif' |
62 |
| - if: github.ref == 'refs/heads/main' |
| 1 | +# --- |
| 2 | +# name: Create OCI image |
| 3 | +# on: |
| 4 | +# pull_request: |
| 5 | +# branches: |
| 6 | +# - main |
| 7 | +# push: |
| 8 | +# branches: |
| 9 | +# - main |
| 10 | + |
| 11 | +# permissions: read-all |
| 12 | + |
| 13 | +# concurrency: |
| 14 | +# group: ${{ github.workflow }}-${{ github.ref }} |
| 15 | +# cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} |
| 16 | + |
| 17 | +# jobs: |
| 18 | +# publish-image: |
| 19 | +# strategy: |
| 20 | +# fail-fast: false |
| 21 | +# matrix: |
| 22 | +# image: [image, nativelink-worker-init, nativelink-worker-lre-cc] |
| 23 | +# name: Publish ${{ matrix.image }} |
| 24 | +# runs-on: ubuntu-22.04 |
| 25 | +# permissions: |
| 26 | +# packages: write |
| 27 | +# id-token: write |
| 28 | +# security-events: write |
| 29 | +# timeout-minutes: 30 |
| 30 | +# steps: |
| 31 | + |
| 32 | +# - name: Checkout |
| 33 | +# uses: >- # v4.1.1 |
| 34 | +# actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 |
| 35 | + |
| 36 | +# - name: Install Nix |
| 37 | +# uses: >- # v10 |
| 38 | +# DeterminateSystems/nix-installer-action@de22e16c4711fca50c816cc9081563429d1cf563 |
| 39 | + |
| 40 | +# - name: Cache Nix derivations |
| 41 | +# uses: >- # v4 |
| 42 | +# DeterminateSystems/magic-nix-cache-action@fc6aaceb40b9845a02b91e059ec147e78d1b4e41 |
| 43 | + |
| 44 | +# - name: Test image |
| 45 | +# run: | |
| 46 | +# nix run .#local-image-test ${{ matrix.image }} |
| 47 | + |
| 48 | +# - name: Upload image |
| 49 | +# run: | |
| 50 | +# nix run .#publish-ghcr ${{ matrix.image }} |
| 51 | +# env: |
| 52 | +# GHCR_REGISTRY: ghcr.io/${{ github.repository_owner }} |
| 53 | +# GHCR_USERNAME: ${{ github.actor }} |
| 54 | +# GHCR_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
| 55 | +# if: github.ref == 'refs/heads/main' |
| 56 | + |
| 57 | +# - name: Upload trivy scan results to GitHub Security tab |
| 58 | +# uses: >- # v2.16.3 |
| 59 | +# github/codeql-action/upload-sarif@592977e6ae857384aa79bb31e7a1d62d63449ec5 |
| 60 | +# with: |
| 61 | +# sarif_file: 'trivy-results.sarif' |
| 62 | +# if: github.ref == 'refs/heads/main' |
0 commit comments