-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only trigger container test workflow for changes in container build
Signed-off-by: Marcela Melara <[email protected]>
- Loading branch information
1 parent
19ea311
commit f7bb9f0
Showing
2 changed files
with
19 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,34 @@ | ||
# yamllint disable rule:line-length | ||
name: Test for BuildEnv L1 container build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'build-container/**' | ||
|
||
permissions: | ||
id-token: write | ||
attestations: write | ||
jobs: | ||
build: | ||
if: "contains(github.event.commits[0].message, '[test]')" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7 | ||
- name: Checkout | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Build docker container | ||
id: build | ||
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0 | ||
with: | ||
context: "." | ||
file: "build-container/test-buildenv-l1.dockerfile" | ||
tags: "test_l1:latest" | ||
|
||
- name: Build docker container | ||
id: build | ||
uses: actions/docker-build-push@5cd11c3a4ced054e52742c5fd54dca954e0edd85 #v6.7.0 | ||
with: | ||
context: "." | ||
file: "build-container/test-buildenv-l1.dockerfile" | ||
tag: "test_l1:latest" | ||
|
||
- name: Generate SLSA Provenance | ||
id: slsa | ||
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 #v1.4.2 | ||
with: | ||
subject-name: "test_l1" | ||
subject-digest: ${{ steps.build.outputs.digest }} | ||
- name: Generate SLSA Provenance | ||
id: slsa | ||
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2 | ||
with: | ||
subject-name: "test_l1" | ||
subject-digest: ${{ steps.build.outputs.digest }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# This file is used fo testing measurements within containers | ||
|
||
def hello(): | ||
print('Hello, World.') | ||
print('Hello, World!!') | ||
|
||
if __name__ == '__main__': | ||
hello() |