mirror of
https://github.com/OpenBankProject/OBP-API.git
synced 2026-02-06 11:47:18 +00:00
enable container creation via repo variable
This commit is contained in:
parent
5611dfcbbd
commit
7d00c791ff
6
.github/workflows/build_container.yml
vendored
6
.github/workflows/build_container.yml
vendored
@ -117,7 +117,7 @@ jobs:
|
||||
path: push/
|
||||
|
||||
- name: Build the Docker image
|
||||
if: github.repository == 'OpenBankProject/OBP-API'
|
||||
if: vars.ENABLE_CONTAINER_BUILDING == 'true'
|
||||
run: |
|
||||
echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin docker.io
|
||||
if [ "${{ github.ref }}" == "refs/heads/develop" ]; then
|
||||
@ -131,11 +131,11 @@ jobs:
|
||||
- uses: sigstore/cosign-installer@4d14d7f17e7112af04ea6108fbb4bfc714c00390
|
||||
|
||||
- name: Write signing key to disk (only needed for `cosign sign --key`)
|
||||
if: github.repository == 'OpenBankProject/OBP-API'
|
||||
if: vars.ENABLE_CONTAINER_BUILDING == 'true'
|
||||
run: echo "${{ secrets.COSIGN_PRIVATE_KEY }}" > cosign.key
|
||||
|
||||
- name: Sign container image
|
||||
if: github.repository == 'OpenBankProject/OBP-API'
|
||||
if: vars.ENABLE_CONTAINER_BUILDING == 'true'
|
||||
run: |
|
||||
cosign sign -y --key cosign.key \
|
||||
docker.io/${{ env.DOCKER_HUB_ORGANIZATION }}/${{ env.DOCKER_HUB_REPOSITORY }}:${GITHUB_REF##*/}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user