devcontainers / devcontainers/ci
Add a boolean output to indicate if the image was pushed
- Dominant language
- TypeScript
- Stars
- 496
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
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 }}
```
Contributor guide
Assessment
This issue has not been assessed yet.