-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Brian Downs <[email protected]>
- Loading branch information
1 parent
038f7c1
commit d6a1377
Showing
3 changed files
with
42 additions
and
4 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 |
---|---|---|
|
@@ -7,6 +7,7 @@ on: | |
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
security-events: write # upload Sarif results | ||
|
||
name: Build | ||
|
@@ -17,10 +18,26 @@ jobs: | |
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Read secrets" | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/github/release-app-credentials appId | APP_ID ; | ||
secret/data/github/repo/${{ github.repository }}/github/release-app-credentials privateKey | PRIVATE_KEY | ||
- name: Create App Token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
repositories: release-node-feature-discovery | ||
app-id: ${{ env.APP_ID }} | ||
private-key: ${{ env.PRIVATE_KEY }} | ||
|
||
- name: Set the TAG value | ||
id: get-TAG | ||
run: | | ||
echo "$(make -s log | grep TAG)" >> "$GITHUB_ENV" | ||
- name: Build container image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
|
@@ -30,6 +47,7 @@ jobs: | |
file: Dockerfile | ||
build-args: | | ||
TAG=${{ env.TAG }} | ||
SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-node-feature-discovery | ||
- name: Run Trivy vulnerability scanner | ||
uses: aquasecurity/[email protected] | ||
|
@@ -52,6 +70,21 @@ jobs: | |
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: "Read secrets" | ||
uses: rancher-eio/read-vault-secrets@main | ||
with: | ||
secrets: | | ||
secret/data/github/repo/${{ github.repository }}/github/release-app-credentials appId | APP_ID ; | ||
secret/data/github/repo/${{ github.repository }}/github/release-app-credentials privateKey | PRIVATE_KEY | ||
- name: Create App Token | ||
uses: actions/create-github-app-token@v1 | ||
id: app-token | ||
with: | ||
repositories: release-multus-cni | ||
app-id: ${{ env.APP_ID }} | ||
private-key: ${{ env.PRIVATE_KEY }} | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
|
@@ -62,6 +95,7 @@ jobs: | |
id: get-TAG | ||
run: | | ||
echo "$(make -s log | grep TAG)" >> "$GITHUB_ENV" | ||
- name: Build container image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
|
@@ -73,3 +107,4 @@ jobs: | |
platforms: linux/arm64 | ||
build-args: | | ||
TAG=${{ env.TAG }} | ||
SRC=x-access-token:${{ steps.app-token.outputs.token }}@github.com/rancher/release-node-feature-discovery |
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
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