From 486949a76097b1d0ff969155cbc93248324944c4 Mon Sep 17 00:00:00 2001 From: Maxim Grischenko Date: Wed, 3 Jul 2024 12:30:52 +0200 Subject: [PATCH] STS-189 test build and push frontend image --- .github/workflows/dockerhub.yml | 12 ++++++++++-- .github/workflows/frontend.yml | 5 +++-- .github/workflows/pull-requests.yml | 18 +++++++++++++++++- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 7f81f5c8..4ccd42e0 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -24,12 +24,20 @@ jobs: with: name: artifacts + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + name: dist + path: sts-client-example + # TODO delete this step after successful testing - name: Display structure of downloaded files run: ls -R - name: Get the tag name - run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + # temporarily +# run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + run: echo "TAG=v1.1.28" >> $GITHUB_ENV - name: Build and push 'sts-example' docker image uses: docker/build-push-action@v6 @@ -74,7 +82,7 @@ jobs: - name: Build and push 'keycloak-sts-adapter' docker image uses: docker/build-push-action@v6 with: - context: ./keycloak-sts-adapter + context: ./keycloak-storage-provider platforms: linux/amd64,linux/arm64 push: true tags: | diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 18eeead1..7400cc51 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -29,8 +29,9 @@ jobs: - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: artifacts + name: dist path: | - ${{ github.workspace }}/**/dist + ${{ github.workspace }}/sts-client-example/dist + ${{ github.workspace }}/sts-client-example/docker/create_env.json.sh overwrite: false if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/pull-requests.yml b/.github/workflows/pull-requests.yml index dea49628..f23bb629 100644 --- a/.github/workflows/pull-requests.yml +++ b/.github/workflows/pull-requests.yml @@ -23,6 +23,16 @@ jobs: - name: Step 3 - Build & Test run: mvn clean verify -ntp + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: artifacts + path: | + ${{ github.workspace }}/**/*.jar + ${{ github.workspace }}/**/Dockerfile + overwrite: false + if-no-files-found: error + - name: Step 4 - Upload coverage reports to Codecov uses: codecov/codecov-action@v4 with: @@ -31,4 +41,10 @@ jobs: build-frontend: uses: ./.github/workflows/frontend.yml - secrets: inherit \ No newline at end of file + secrets: inherit + + # temporarily + dockerhub: + needs: [ build-java, build-frontend ] + uses: ./.github/workflows/dockerhub.yml + secrets: inherit