Merge pull request #307 from validatedpatterns/konflux/references/main #1334
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
name: "Docker Build" | |
on: [push, pull_request] | |
jobs: | |
docker-build: | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Docker Build | |
env: | |
KEY: ${{ secrets.API_KEY }} | |
shell: bash | |
run: | | |
set -e | |
export APIFILE="internal/controller/apikey.txt" | |
trap "rm -f ${APIFILE}" SIGINT EXIT | |
if [ -z "${KEY}" ]; then | |
echo "Key is empty" | |
echo '' > "${APIFILE}" | |
else | |
echo "Key is set" | |
echo "${KEY}" > "${APIFILE}" | |
fi | |
make USE_IMAGE_DIGESTS=true docker-build |