Skip to content

Commit 8ebf554

Browse files
Merge pull request #45 from vyzigold/add-check-secrets
Add check-secrets job to build-sg-core action
2 parents cdc4972 + 5534dda commit 8ebf554

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/build-sg-core.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,23 @@ env:
1818
latesttag: latest
1919

2020
jobs:
21+
check-secrets:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Check secrets are set
25+
id: check
26+
if: "${{ env.imagenamespace == '' }}"
27+
run: |
28+
echo "::error title=Missing required secrets::See https://github.com/openstack-k8s-operators/dev-docs/blob/main/image_build.md#creating-images-using-github-actions"
29+
echo "missing=true">>$GITHUB_OUTPUT
30+
outputs:
31+
missing-secrets: ${{ steps.check.outputs.missing }}
2132

2233
build:
34+
needs: check-secrets
2335
name: Build sg-core image using buildah
2436
runs-on: ubuntu-latest
37+
if: needs.check-secrets.outputs.missing-secrets != 'true'
2538

2639
steps:
2740
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)