Skip to content

Commit cba789a

Browse files
authored
Merge branch 'main' into feature/amp-devcontainer-cpp/update-apt-packages
2 parents 3470284 + 6a810c0 commit cba789a

File tree

6 files changed

+24
-14
lines changed

6 files changed

+24
-14
lines changed

.devcontainer/rust/devcontainer-metadata-vscode.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"extensions": [
88
99
10-
10+
1111
1212
1313
]

.github/workflows/linting-formatting.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ jobs:
3434
fetch-depth: 0
3535
persist-credentials: false
3636
- uses: zizmorcore/zizmor-action@f52a838cfabf134edcbaa7c8b3677dde20045018 # v0.1.1
37+
with:
38+
persona: pedantic
3739
# flavors/dotnet is the smallest flavor of MegaLinter that contains the linters
3840
# we are interested in.
3941
- uses: oxsecurity/megalinter/flavors/dotnet@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0

.github/workflows/pr-image-cleanup.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,13 @@ jobs:
4747
- run: |
4848
gh extension install actions/gh-actions-cache
4949
50-
REPO=${{ github.repository }}
51-
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
52-
5350
## Setting this to not fail the workflow while deleting cache keys.
5451
set +e
55-
for cacheKey in $(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1)
52+
for cacheKey in $(gh actions-cache list -R "${GH_REPO}" -B "${BRANCH}" | cut -f 1)
5653
do
57-
gh actions-cache delete "$cacheKey" -R $REPO -B $BRANCH --confirm
54+
gh actions-cache delete "${cacheKey}" -R "${GH_REPO}" -B "${BRANCH}" --confirm
5855
done
5956
env:
6057
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
GH_REPO: ${{ github.repository }}
59+
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge

.github/workflows/release-build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,19 @@ jobs:
7777
id: inspect-manifest
7878
run: |
7979
set -Eeuo pipefail
80-
output=$(docker buildx imagetools inspect "${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}:${REF_NAME}" --format '{{json .}}')
80+
output=$(docker buildx imagetools inspect "${REGISTRY}/${GH_REPO}-${CONTAINER_FLAVOR}:${REF_NAME}" --format '{{json .}}')
8181
echo "digest=$(echo "$output" | jq -r '.manifest.digest // .manifests[0].digest')" >> "$GITHUB_OUTPUT"
82+
env:
83+
GH_REPO: ${{ github.repository }}
8284
- name: Upload provenance to release
8385
run: |
8486
set -Eeuo pipefail
8587
FORMATTED_DIGEST=${DIGEST//:/_}
86-
gh attestation verify --repo ${{ github.repository }} "oci://${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}@${DIGEST}" --format json --jq '.[] | .attestation.bundle.dsseEnvelope | select(.payloadType == "application/vnd.in-toto+json").payload' | base64 -d | jq . > "${REPOSITORY_OWNER}-${REPOSITORY_NAME}-${CONTAINER_FLAVOR}_${FORMATTED_DIGEST}.intoto.jsonl"
88+
gh attestation verify --repo "${GH_REPO}" "oci://${REGISTRY}/${GH_REPO}-${CONTAINER_FLAVOR}@${DIGEST}" --format json --jq '.[] | .attestation.bundle.dsseEnvelope | select(.payloadType == "application/vnd.in-toto+json").payload' | base64 -d | jq . > "${REPOSITORY_OWNER}-${REPOSITORY_NAME}-${CONTAINER_FLAVOR}_${FORMATTED_DIGEST}.intoto.jsonl"
8789
gh release upload "${REF_NAME}" ./*.intoto.jsonl
8890
env:
8991
DIGEST: ${{ steps.inspect-manifest.outputs.digest }}
92+
GH_REPO: ${{ github.repository }}
9093
GH_TOKEN: ${{ github.token }}
9194
REPOSITORY_OWNER: ${{ github.repository_owner }}
9295
REPOSITORY_NAME: ${{ github.event.repository.name }}

.github/workflows/wc-build-push.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,11 @@ jobs:
7474
- name: Export digest
7575
run: |
7676
set -Eeuo pipefail
77-
mkdir -p ${{ runner.temp }}/digests
78-
touch "${{ runner.temp }}/digests/${DIGEST#sha256:}"
77+
mkdir -p "${RUNNER_TEMP}/digests"
78+
touch "${RUNNER_TEMP}/digests/${DIGEST#sha256:}"
7979
env:
8080
DIGEST: ${{ steps.build-and-push.outputs.digest }}
81+
RUNNER_TEMP: ${{ runner.temp }}
8182
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8283
with:
8384
name: digests-${{ inputs.flavor }}-${{ steps.devcontainer-arch.outputs.arch }}
@@ -137,7 +138,7 @@ jobs:
137138
import json
138139
import subprocess
139140
140-
CONTAINER = f"{os.getenv('REGISTRY')}/${{ github.repository }}-{os.getenv('CONTAINER_FLAVOR')}"
141+
CONTAINER = f"{os.getenv('REGISTRY')}/{os.getenv('GH_REPO')}-{os.getenv('CONTAINER_FLAVOR')}"
141142
METADATA = json.loads(os.getenv('METADATA_JSON'))
142143
143144
digests = [f for f in os.listdir('.') if f.startswith('sha256:') or len(f) == 64]
@@ -152,16 +153,18 @@ jobs:
152153
subprocess.run(command, check=True)
153154
env:
154155
METADATA_JSON: ${{ steps.metadata.outputs.json }}
156+
GH_REPO: ${{ github.repository }}
155157
shell: python
156158
working-directory: ${{ runner.temp }}/digests
157159
- name: Inspect manifest and extract digest
158160
id: inspect-manifest
159161
run: |
160162
set -Eeuo pipefail
161-
output=$(docker buildx imagetools inspect "${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}:${CONTAINER_VERSION}" --format '{{json .}}')
163+
output=$(docker buildx imagetools inspect "${REGISTRY}/${GH_REPO}-${CONTAINER_FLAVOR}:${CONTAINER_VERSION}" --format '{{json .}}')
162164
echo "digest=$(echo "$output" | jq -r '.manifest.digest // .manifests[0].digest')" >> "$GITHUB_OUTPUT"
163165
env:
164166
CONTAINER_VERSION: ${{ steps.metadata.outputs.version }}
167+
GH_REPO: ${{ github.repository }}
165168
- run: |
166169
set -Eeuo pipefail
167170
wget -O diffoci https://github.com/reproducible-containers/diffoci/releases/download/v0.1.7/diffoci-v0.1.7.linux-amd64
@@ -196,7 +199,8 @@ jobs:
196199
show-summary: false
197200
push-to-registry: true
198201
- name: Verify attestation
199-
run: gh attestation verify --repo ${{ github.repository }} "oci://${REGISTRY}/${{ github.repository }}-${CONTAINER_FLAVOR}@${DIGEST}"
202+
run: gh attestation verify --repo "${GH_REPO}" "oci://${REGISTRY}/${GH_REPO}-${CONTAINER_FLAVOR}@${DIGEST}"
200203
env:
201204
DIGEST: ${{ steps.inspect-manifest.outputs.digest }}
205+
GH_REPO: ${{ github.repository }}
202206
GH_TOKEN: ${{ github.token }}

.github/workflows/wc-integration-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
with:
3535
path: ${{ runner.temp }}
3636
pattern: digests-${{ inputs.flavor }}-${{ steps.runner-arch.outputs.arch }}
37-
- run: echo "container=$(printf "ghcr.io/${{ github.repository }}-${CONTAINER_FLAVOR}@sha256:%s " *)" >> "$GITHUB_OUTPUT"
37+
- run: echo "container=$(printf "ghcr.io/${GH_REPO}-${CONTAINER_FLAVOR}@sha256:%s " *)" >> "$GITHUB_OUTPUT"
3838
working-directory: ${{ runner.temp }}/digests-${{ inputs.flavor }}-${{ steps.runner-arch.outputs.arch }}
39+
env:
40+
GH_REPO: ${{ github.repository }}
3941
id: set-container
4042
run-test:
4143
needs: determine-container

0 commit comments

Comments
 (0)