name: Docker Build Production on: release: types: [published] jobs: build: runs-on: ubuntu-latest steps: # # Get Release Version # - uses: oprypin/find-latest-tag@v1 with: repository: hay-kot/mealie # The repository to scan. releases-only: true # We know that all relevant tags have a GitHub release for them. id: mealie_version # The step ID to refer to later. # # Checkout # - name: checkout code uses: actions/checkout@v2 # # Setup QEMU # - name: Set up QEMU id: qemu uses: docker/setup-qemu-action@v1 with: image: tonistiigi/binfmt:latest platforms: all # # Setup Buildx # - name: install buildx id: buildx uses: docker/setup-buildx-action@v1 with: install: true # # Login to Docker Hub # - name: Login to Docker Hub uses: docker/login-action@v1 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} # # Build Backend # - name: build the image run: | docker build --push --no-cache \ --tag hkotel/mealie:api-${{ steps.mealie_version.outputs.tag }} \ --build-arg COMMIT=$(git rev-parse HEAD) \ --platform linux/amd64,linux/arm64 . # # Build Frontend # - name: build the image working-directory: "frontend" run: | docker build --push --no-cache \ --tag hkotel/mealie:frontend-${{ steps.mealie_version.outputs.tag }} \ --platform linux/amd64,linux/arm64 . # # Release Discord Notification # - name: Discord notification env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_RELEASE_WEBHOOK }} uses: Ilshidur/action-discord@0.3.2 with: args: '🚀 Version {{ EVENT_PAYLOAD.release.tag_name }} of Mealie has been released. See the release notes https://github.com/hay-kot/mealie/releases/tag/{{ EVENT_PAYLOAD.release.tag_name }}'