Files
mealie/.github/workflows/release.yml
2022-09-10 16:22:35 -08:00

69 lines
1.9 KiB
YAML

name: Docker Build Production
on:
release:
types: [published]
jobs:
backend-tests:
name: "Backend Server Tests"
uses: ./.github/workflows/partial-backend.yml
frontend-tests:
name: "Frontend and End-to-End Tests"
uses: ./.github/workflows/partial-frontend.yml
get-release:
name: "Get Releave Tag"
runs-on: ubuntu-latest
needs:
- backend-tests
- frontend-tests
outputs:
tag: ${{ steps.get-tag.outputs.tag }}
steps:
- 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.
build-release:
name: Build Tagged Release
uses: ./.github/workflows/partial-builder.yml
needs:
- get-release
with:
tag: ${{ jobs.get-release.outputs.tag }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
publish-docs:
name: Deploy docs
runs-on: ubuntu-latest
needs:
- build-release
steps:
- name: Checkout main
uses: actions/checkout@v2
- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONFIG_FILE: docs/mkdocs.yml
EXTRA_PACKAGES: build-base
notify-discord:
name: Notify Discord
needs:
- build-release
runs-on: ubuntu-latest
steps:
- 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 }}"