Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d90f10a
chore: fix acceptance tests on default branch
rjaegers Jun 16, 2025
6586c43
chore: add more harder-runner
rjaegers Jun 16, 2025
8a61915
chore: hoist up dependency-review
rjaegers Jun 16, 2025
f6ee859
chore: enable acceptance test for release
rjaegers Jun 16, 2025
7c0c79f
docs: add missing '.'
rjaegers Jun 16, 2025
33ecb15
Merge branch 'main' into feature/fix-acceptance-tests-on-default-branch
rjaegers Jun 18, 2025
1fc41be
chore: re-add annotations
rjaegers Jun 18, 2025
3fc3956
Merge branch 'feature/fix-acceptance-tests-on-default-branch' of http…
rjaegers Jun 18, 2025
df910c3
chore: fix jq syntax error
rjaegers Jun 18, 2025
6cd10ff
chore: try to prevent shell escaping
rjaegers Jun 18, 2025
d1276b9
chore: revert 'fix' and enable debugging
rjaegers Jun 18, 2025
185356c
chore: let jq do some escaping by using @sh
rjaegers Jun 18, 2025
94e04e2
chore: try different approach to escaping
rjaegers Jun 18, 2025
0af7be8
chore: remove set flags
rjaegers Jun 18, 2025
0d1959a
chore: prevent shell escaping
rjaegers Jun 18, 2025
ad6d460
chore: back at the starting line
rjaegers Jun 18, 2025
8e31de0
chore: trying ai suggestions
rjaegers Jun 18, 2025
3a61704
chore: debug...
rjaegers Jun 18, 2025
b8b498c
chore: this might work
rjaegers Jun 18, 2025
df43562
chore: running out of options
rjaegers Jun 18, 2025
69e4d82
chore: small step back
rjaegers Jun 18, 2025
fee3249
chore: another angle
rjaegers Jun 18, 2025
cfc9247
chore: back to square one
rjaegers Jun 18, 2025
109376d
chore: desperate measures
rjaegers Jun 18, 2025
e15a37d
chore: fix python specific issues
rjaegers Jun 18, 2025
3716074
chore: final round... fight
rjaegers Jun 18, 2025
e0cb862
chore: fix argument concatenation
rjaegers Jun 18, 2025
e46e655
chore: rebound
rjaegers Jun 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
uses: ./.github/workflows/wc-build-push-test.yml
secrets: inherit
permissions:
actions: read
attestations: write
checks: write
contents: write
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: ./.github/workflows/wc-build-push-test.yml
secrets: inherit
permissions:
actions: read
attestations: write
checks: write
contents: write
Expand Down Expand Up @@ -49,6 +50,9 @@ jobs:
env:
REGISTRY: ghcr.io
steps:
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- name: Inspect manifest and extract digest
id: inspect-manifest
run: |
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/wc-acceptance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ jobs:
- name: Start Codespace
run: |
set -Eeuo pipefail
gh secret set -a codespaces IMAGE_VERSION --body "pr-${{ github.event.pull_request.number }}"

if [[ "${{ github.event_name }}" == "pull_request" ]]; then
gh secret set -a codespaces IMAGE_VERSION --body "pr-${{ github.event.pull_request.number }}"
elif [[ "${{ github.event_name }}" == "push" && "${{ startsWith(github.ref, 'refs/tags/') }}" == "true" ]]; then
gh secret set -a codespaces IMAGE_VERSION --body "${GITHUB_REF#refs/tags/}"
else
gh secret set -a codespaces IMAGE_VERSION --body "edge"
fi

echo CODESPACE_NAME="$(gh codespace create -R "${{ github.repository }}" -b "$HEAD_REF" -m basicLinux32gb --devcontainer-path ".devcontainer/${{ inputs.flavor }}-test/devcontainer.json" --idle-timeout 10m --retention-period 1h)" >> "$GITHUB_ENV"
env:
GH_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/wc-build-push-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: ./.github/workflows/wc-build-push.yml
secrets: inherit
permissions:
actions: read
attestations: write
contents: write
id-token: write
Expand All @@ -23,6 +24,25 @@ jobs:
with:
flavor: ${{ matrix.flavor }}

dependency-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
needs: build-push
if: github.event_name == 'pull_request'
steps:
- uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
with:
comment-summary-in-pr: on-failure
fail-on-severity: critical

integration-test:
strategy:
matrix:
Expand Down
29 changes: 19 additions & 10 deletions .github/workflows/wc-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
runs-on: ubuntu-latest
needs: build-push
permissions:
actions: read
attestations: write
# dependency-submission needs contents write permission.
contents: write
Expand Down Expand Up @@ -123,12 +124,25 @@ jobs:
type=semver,pattern={{major}}
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
shell: python
run: |
set -Eeuo pipefail
# shellcheck disable=SC2046
docker buildx imagetools create \
$(echo '${{ steps.metadata.outputs.json }}' | jq -r '.tags | map("--tag " + .) | join(" ")') \
$(printf '${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.flavor }}@sha256:%s ' *)
import os
import json
import subprocess

CONTAINER = '${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.flavor }}'
METADATA = json.loads('${{ steps.metadata.outputs.json }}')

digests = [f for f in os.listdir('.') if f.startswith('sha256:') or len(f) == 64]

command = ['docker', 'buildx', 'imagetools', 'create',
*[annotation for annotation in METADATA.get('annotations', []) for annotation in ('--annotation', annotation)],
*[tag for tag in METADATA.get('tags', []) for tag in ('--tag', tag)],
*[f"{CONTAINER}@sha256:{digest}" for digest in digests]
]

print(' '.join(command))
subprocess.run(command, check=True)
- name: Inspect manifest and extract digest
id: inspect-manifest
run: |
Expand All @@ -149,11 +163,6 @@ jobs:
with:
image: ${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.flavor }}@${{ steps.inspect-manifest.outputs.digest }}
dependency-snapshot: true
- uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
if: github.event_name == 'pull_request'
with:
comment-summary-in-pr: on-failure
fail-on-severity: critical
- uses: actions/attest-build-provenance@e8998f949152b193b063cb0ec769d69d929409be # v2.4.0
with:
subject-name: ${{ env.REGISTRY }}/${{ github.repository }}-${{ inputs.flavor }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The amp-devcontainer repository follows a [semantic versioning](https://semver.o

Released containers will never be cleaned-up, pull request builds are cleaned up when the pull request is merged, and edge builds may be cleaned up after being stale for a while.

The release notes always contain an overview of the corresponding image versions that included the full SHA next to the version number. This makes it possible for humans to easily see what version is used while still pinning to an exact version. This is the recommended way to refer to an image.
The release notes always contain an overview of the corresponding image versions that include the full SHA next to the version number. This makes it possible for humans to easily see what version is used while still pinning to an exact version. This is the recommended way to refer to an image.

All container images are included in a release. This might change in the future when the need arises to have separate releases per container.

Expand Down Expand Up @@ -217,5 +217,5 @@ See [security](.github/SECURITY.md) for more information.

## Licenses

amp-devcontainer is licensed under the MIT license
amp-devcontainer is licensed under the MIT license.
See [license](./LICENSE) for more information.
Loading