Skip to content

Merge pull request #109 from FusionAuth/wied03/remove_old_arch #161

Merge pull request #109 from FusionAuth/wied03/remove_old_arch

Merge pull request #109 from FusionAuth/wied03/remove_old_arch #161

name: Publish Docker
on:
push:
branches:
- main
- 1.52.0.maintenance
paths:
- 'docker/fusionauth/release-trigger'
concurrency: docker-concurrency-group
jobs:
multiarch-build:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set variabless
run: |
echo "FUSIONAUTH_VERSION=$(cat docker/fusionauth/release-trigger | grep version= | awk -F= {'print $2'})" >> $GITHUB_ENV
echo "FUSIONAUTH_LATEST_VERSION=$(cat docker/fusionauth/release-trigger | grep latestVersion= | awk -F= {'print $2'})" >> $GITHUB_ENV
echo "FUSIONAUTH_TAG_SUFFIX=$(cat docker/fusionauth/release-trigger | grep tagSuffix= | awk -F= {'print $2'})" >> $GITHUB_ENV
- name: Build version tag
run: |
echo "FUSIONAUTH_TAGS=fusionauth/fusionauth-app:${{ env.FUSIONAUTH_VERSION }}${{ env.FUSIONAUTH_TAG_SUFFIX }}" >> $GITHUB_ENV
- name: Optional :latest tag
if: ${{ env.FUSIONAUTH_LATEST_VERSION == 'true' }}
run: |
echo "FUSIONAUTH_TAGS=${{ env.FUSIONAUTH_TAGS }},fusionauth/fusionauth-app:latest${{ env.FUSIONAUTH_TAG_SUFFIX }}" >> $GITHUB_ENV
- name: Job summary
run: |
echo "Version: ${{ env.FUSIONAUTH_VERSION }}"
echo "Latest version: ${{ env.FUSIONAUTH_LATEST_VERSION }}"
echo "Tags: ${{ env.FUSIONAUTH_TAGS }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/fusionauth/fusionauth-app/Dockerfile
build-args: FUSIONAUTH_VERSION=${{ env.FUSIONAUTH_VERSION }}
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: true
tags: ${{ env.FUSIONAUTH_TAGS }}