devcontainers / devcontainers/ci

Add a boolean output to indicate if the image was pushed

Offen
#446 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
496
Forks
101
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Please add an output that indicates whether or not the image was successfully pushed.
This can be useful in cases where the push may be filtered out, and rather than repeating the same filter on a subsequent step it would be simpler to condition it based on the output from this action. For example:
```yaml
- id: build
name: Pre-build dev container image
uses: devcontainers/ci@v0.3
with:
imageName: someRepo/someImage
imageTag: someTag
push: filter
refFilterForPush: |
refs/heads/main

- id: get-digest
name: Get image Digest
run: |
digest=$(docker inspect --format={{.Id}} someRepo/someImage:someTag
echo "Image Digest: $digest"
echo "digest=${digest}" >> $GITHUB_OUTPUT

- id: attest
name: Attest
uses: actions/attest-build-provenance@v3
with:
subject-name: someRepo/someImage
subject-digest: ${{ steps.get-digest.outputs.digest }}
push-to-registry: ${{ steps.build.outputs.wasPushed }}
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Start by tracing the devcontainers/ci action's handling of the push and refFilterForPush inputs, along with its existing step outputs. Verify the output is true only when the image is pushed successfully and false when the push is filtered out, then exercise it in the YAML workflow scenario described.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker, github-actions, typescript
Bereich
ci-cd, devops
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
68/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.