Skip to content

Specify the organization name in the email subject #2271

Specify the organization name in the email subject

Specify the organization name in the email subject #2271

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
env:
IAM_DB_HOST: localhost
run: |
sudo systemctl start mysql
mysql -uroot -proot -e "CREATE USER 'iam'@'%' IDENTIFIED BY 'pwd';"
mysql -uroot -proot -e "CREATE DATABASE iam CHARACTER SET latin1 COLLATE latin1_swedish_ci;"
mysql -uroot -proot -e "GRANT ALL ON *.* TO 'iam'@'%';"
mysql -uroot -proot -e "FLUSH PRIVILEGES;"
mvn -Dspring.profiles.active=mysql-test -q 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 -q spring-boot:build-image
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker login
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
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@v5
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@v5
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@v5
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
platforms: linux/amd64,linux/arm64
push: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build & push iam-test-client docker image
uses: docker/build-push-action@v5
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
platforms: linux/amd64,linux/arm64
push: ${{ startsWith(github.ref, 'refs/tags/') }}