Skip to content

Merge pull request #21 from g3rhard/renovate/major-github-actions #6

Merge pull request #21 from g3rhard/renovate/major-github-actions

Merge pull request #21 from g3rhard/renovate/major-github-actions #6

Workflow file for this run

---
name: Docker Build/Publish Image
on:
push:
branches: [production]
paths-ignore:
- README.md
- .trunk
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3
- name: Login to DockerHub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get current date
run: echo "DATE=$(date +'%Y.%m.%d')" >> "$GITHUB_ENV"
- name: Build and push
uses: docker/build-push-action@31159d49c0d4756269a0940a750801a1ea5d7003 # v6
with:
context: .
push: true
tags: ${{ github.repository }}:${{ env.DATE }}-${{ github.ref_name }}
platforms: linux/amd64,linux/arm64
- name: Create a Release
uses: elgohr/Github-Release-Action@edea2b66b44cdd48a00eb134b39959db2703b1cd # 20240405193535
if: success()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: "Release ${{ env.DATE }}"
- name: Send Discord notification
uses: sarisia/actions-status-discord@609229a5cc8b81e6de55f63e6cdd5e171a3c1895 # v1
if: always()
with:
title: "Build image on ${{ github.repository }}: ${{ github.workflow }}"
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}