Skip to content

Fix scope matching which affects device code flow (#649) #1192

Fix scope matching which affects device code flow (#649)

Fix scope matching which affects device code flow (#649) #1192

Workflow file for this run

name: build & packaging
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
java-version: [17]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK ${{matrix.java-version}}
uses: actions/setup-java@v2
with:
distribution: temurin
cache: maven
java-version: ${{matrix.java-version}}
- name: License check
run: mvn -B license:check
- name: Build, test, package
run: mvn -U -B clean package install
- name: Copy artifacts to docker dir
run: |
cp iam-login-service/target/iam-login-service.war iam-login-service/docker
cp iam-test-client/target/iam-test-client.jar iam-test-client/docker
- name: Generate buildpacks
run: mvn -DskipTests -U -B spring-boot:build-image
- name: Docker login
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Publish buildpacks on Dockerhub
if: startsWith(github.ref, 'refs/tags/')
env:
DEBUG: y
run: ./utils/tag-push-images.sh ${GITHUB_REF#refs/tags/}
- name: Docker metainformation for iam-login-service
id: ls-meta
uses: docker/metadata-action@v3
with:
images: indigoiam/iam-login-service
tags: |
type=sha
type=ref,event=tag
- name: Docker metainformation for iam-test-client
id: tc-meta
uses: docker/metadata-action@v3
with:
images: indigoiam/iam-test-client
tags: |
type=sha
type=ref,event=tag
- name: Build & push iam-login-service docker image
uses: docker/build-push-action@v2
with:
tags: ${{ steps.ls-meta.outputs.tags }}
labels: ${{ steps.ls-meta.outputs.labels }}
context: iam-login-service/docker/
file: iam-login-service/docker/Dockerfile.prod
push: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build & push iam-test-client docker image
uses: docker/build-push-action@v2
with:
tags: ${{ steps.tc-meta.outputs.tags }}
labels: ${{ steps.tc-meta.outputs.labels }}
context: iam-test-client/docker/
file: iam-test-client/docker/Dockerfile.prod
push: ${{ startsWith(github.ref, 'refs/tags/') }}