Skip to content

Commit

Permalink
fix: test if ARGs are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandMeppa committed Feb 8, 2024
1 parent 15d1b72 commit da21bde
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ jobs:
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}


- name: Print USERNAME
run: echo "USERNAME is ${{ github.actor }}"

- name: Check PAT
run: |
if [[ -z "${{ secrets.GITHUB_TOKEN }}" ]]; then
echo "PAT is not set."
else
echo "PAT is set."
fi
- name: Build container
uses: docker/build-push-action@v5
with:
Expand Down
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ RUN apt-get update && \
ARG USERNAME
ARG PAT

RUN echo $USERNAME && \
echo $PAT && \
git clone https://$USERNAME:[email protected]/adorsys/kc-oid4vci-deployment.git /app/kc-oid4vci-deployment && \
# Print USERNAME
RUN echo "USERNAME: $USERNAME"

# Check if PAT is set
RUN if [ -z "$PAT" ]; then echo "PAT is not set"; else echo "PAT is set"; fi


RUN git clone https://"$USERNAME":"$PAT"@github.com/adorsys/kc-oid4vci-deployment.git /app/kc-oid4vci-deployment && \
git -C /app/kc-oid4vci-deployment checkout issue-25638

# Stage 2: Build the project
Expand Down

0 comments on commit da21bde

Please sign in to comment.