Skip to content

Commit

Permalink
test: docker build & earthfile
Browse files Browse the repository at this point in the history
  • Loading branch information
sdisalvo-crd committed Feb 28, 2025
1 parent 23dea2a commit 060bf4e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 35 deletions.
50 changes: 16 additions & 34 deletions .github/workflows/docker-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,40 +73,22 @@ jobs:
DOCKER_REGISTRIES: "${{ secrets.DOCKER_REGISTRIES }}"

- name: Set docker image targets based on path changes from last commit
id: metadata
run: |
set -x
if [ ${{github.event_name}} == "workflow_dispatch" ]
then
case "${{ github.event.inputs.images }}" in
idw-keria)
DOCKER_IMAGES_TARGETS="idw-keria"
;;
idw-witness)
DOCKER_IMAGES_TARGETS="idw-witness"
;;
cred-issuance)
DOCKER_IMAGES_TARGETS="cred-issuance"
;;
cred-issuance-ui)
DOCKER_IMAGES_TARGETS="cred-issuance-ui"
;;
cip45-sample-dapp)
DOCKER_IMAGES_TARGETS="cip45-sample-dapp"
;;
all)
DOCKER_IMAGES_TARGETS="idw-keria idw-witness cred-issuance cred-issuance-ui cip45-sample-dapp"
;;
*)
echo "Invalid option, exiting..."
exit 1
;;
esac
echo "DOCKER_IMAGES_TARGETS=${DOCKER_IMAGES_TARGETS}" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT"
echo "DOCKER_IMAGES_TARGETS_$(echo ${{ matrix.platform }} | sed 's|/|_|g')=${DOCKER_IMAGES_TARGETS}" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT"
fi
id: metadata
run: |
set -x
if [ ${{github.event_name}} == "workflow_dispatch" ]; then
case "${{ github.event.inputs.images }}" in
idw-keria) DOCKER_IMAGES_TARGETS="idw-keria" ;;
idw-witness) DOCKER_IMAGES_TARGETS="idw-witness" ;;
cred-issuance) DOCKER_IMAGES_TARGETS="cred-issuance" ;;
cred-issuance-ui) DOCKER_IMAGES_TARGETS="cred-issuance-ui" ;;
cip45-sample-dapp) DOCKER_IMAGES_TARGETS="cip45-sample-dapp" ;;
all) DOCKER_IMAGES_TARGETS="idw-keria idw-witness cred-issuance cred-issuance-ui cip45-sample-dapp" ;;
*) echo "Invalid option, exiting..." ; exit 1 ;;
esac
echo "DOCKER_IMAGES_TARGETS=${DOCKER_IMAGES_TARGETS}" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT"
echo "DOCKER_IMAGES_TARGETS_$(echo ${{ matrix.platform }} | sed 's|/|_|g')=${DOCKER_IMAGES_TARGETS}" | tee -a "$GITHUB_ENV" | tee -a "$GITHUB_OUTPUT"
fi
if [ ${{github.event_name}} == "pull_request" ]
then
Expand Down
1 change: 0 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ VERSION 0.8
IMPORT --allow-privileged github.com/cardano-foundation/cf-gha-workflows/./earthfiles/functions:main AS functions

ARG --global DOCKER_IMAGES_TARGETS="idw-keria idw-witness cred-issuance cred-issuance-ui cip45-sample-dapp"

ARG --global DOCKER_IMAGES_PREFIX="cf"
ARG --global DOCKER_IMAGES_EXTRA_TAGS=""
ARG --global DOCKER_IMAGES_LABELS=""
Expand Down

0 comments on commit 060bf4e

Please # to comment.