Migrate to Spring Boot 3.1 #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Container build workflow. | |
# | |
# Every time something is pushed to the "main" branch, run tests and | |
# build a container image. Push the container image to Docker Hub. | |
# | |
name: Build Container | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
build-container: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Inspect builder | |
run: | | |
echo "Name: ${{ steps.buildx.outputs.name }}" | |
echo "Endpoint: ${{ steps.buildx.outputs.endpoint }}" | |
echo "Status: ${{ steps.buildx.outputs.status }}" | |
echo "Flags: ${{ steps.buildx.outputs.flags }}" | |
echo "Platforms: ${{ steps.buildx.outputs.platforms }}" | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Maven | |
uses: s4u/[email protected] | |
with: | |
servers: | | |
[{ | |
"id": "ukf-packages", | |
"username": "${{ github.actor }}", | |
"password": "${{ secrets.GITHUB_TOKEN }}" | |
}] | |
- name: Propagate Maven settings file. | |
run: | | |
mkdir -p m2 | |
cp -f ~/.m2/settings.xml m2/settings.xml | |
- name: Build and push | |
run: | | |
docker buildx build --platform=linux/amd64,linux/arm64 \ | |
--push \ | |
--tag ${{ secrets.DOCKERHUB_USERNAME }}/mdq-server:latest \ | |
. |