Files
portabase/.github/workflows/release.yml
T
a8eb3f5f1a fix: workflow
* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
2026-03-06 13:31:03 +01:00

72 lines
1.8 KiB
YAML

name: Publish Docker image for release
on:
release:
types: [created, edited]
# push:
# tags:
# - "*.*.*"
# - "!*-*"
permissions:
contents: read
packages: write
jobs:
log-draft-tag:
runs-on: ubuntu-latest
steps:
- name: Read draft tag
run: |
echo ${{ github.event.release.id }}
docker_publish:
uses: ./.github/workflows/docker.yml
with:
add_latest: true
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
publish_release:
needs: docker_publish
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get draft release tag
if: ${{ github.event.release.draft == true }}
id: draft_tag
run: |
TAG=$(gh release view ${{ github.event.release.id }} --json tagName -q ".tagName")
echo "RELEASE_TAG=$TAG" >> $GITHUB_ENV
# - name: Publish GitHub Release
# if: ${{ github.event.release.draft == true }}
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # gh release edit v${{ github.ref_name }} --draft=false
# run: |
# gh release edit ${{ github.event.release.id }} --draft=false
- name: Publish GitHub Release
if: ${{ github.event.release.draft == true }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release edit $RELEASE_TAG --draft=false
discord_notification:
needs: docker_publish
uses: ./.github/workflows/discord.yml
with:
discord_title: "New Release: v${{ github.ref_name }}"
discord_color: 3066993
discord_footer: "Portabase"
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}