Skip to content

Commit

Permalink
👷 Build an image using SSI identity
Browse files Browse the repository at this point in the history
  • Loading branch information
agmangas committed Mar 1, 2024
1 parent 1a73e04 commit f87f148
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,30 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2.2.0
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.9.1
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
uses: docker/login-action@v4
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push (OAuth2 disabled)
uses: docker/build-push-action@v4.1.1
- name: Build and push (Mock identity)
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
ENABLE_OAUTH2=false
ENABLE_SSI=false
tags: |
${{ env.IMAGE_NAME }}:latest
${{ env.IMAGE_NAME }}:${{ github.ref_name }}
${{ env.IMAGE_NAME }}:${{ github.sha }}
- name: Build and push (OAuth2 enabled)
uses: docker/build-push-action@v4.1.1
- name: Build and push (OAuth2 identity)
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand All @@ -46,3 +47,14 @@ jobs:
${{ env.IMAGE_NAME }}:latest-oauth2
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-oauth2
${{ env.IMAGE_NAME }}:${{ github.sha }}-oauth2
- name: Build and push (SSI identity)
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
ENABLE_SSI=true
tags: |
${{ env.IMAGE_NAME }}:latest-ssi
${{ env.IMAGE_NAME }}:${{ github.ref_name }}-ssi
${{ env.IMAGE_NAME }}:${{ github.sha }}-ssi
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ RUN mkdir -p ${PATH_CONNECTOR}
WORKDIR ${PATH_CONNECTOR}

ARG ENABLE_OAUTH2=false
ARG ENABLE_SSI=false

COPY ./connector .
ENV ORG_GRADLE_PROJECT_useOauthIdentity=${ENABLE_OAUTH2}
ENV ORG_GRADLE_PROJECT_useSSI=${ENABLE_SSI}
RUN /opt/gradle/latest/bin/gradle clean build

COPY ./scripts/keystore-to-vault.sh .
Expand Down

0 comments on commit f87f148

Please sign in to comment.