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

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
This commit is contained in:
Charles GTE
2026-03-06 18:03:32 +01:00
committed by GitHub
co-authored by charlesgauthereau
parent 6acdf73557
commit e3c5ec9a58
2 changed files with 22 additions and 13 deletions
+5 -2
View File
@@ -3,6 +3,9 @@ name: Discord Notification
on:
workflow_call:
inputs:
release_tag:
required: true
type: string
discord_title:
required: true
type: string
@@ -27,10 +30,10 @@ jobs:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
RELEASE_INFO=$(gh release view "${{ github.ref_name }}" -R ${{ github.repository }} --json name,url,body,author)
RELEASE_INFO=$(gh release view "${{ inputs.release_tag }}" -R ${{ github.repository }} --json name,url,body,author)
RELEASE_TITLE=$(echo "$RELEASE_INFO" | jq -r .name)
if [ -z "$RELEASE_TITLE" ] || [ "$RELEASE_TITLE" = "null" ]; then RELEASE_TITLE="${{ github.ref_name }}"; fi
if [ -z "$RELEASE_TITLE" ] || [ "$RELEASE_TITLE" = "null" ]; then RELEASE_TITLE="${{ inputs.release_tag }}"; fi
RELEASE_URL=$(echo "$RELEASE_INFO" | jq -r .url)
RELEASE_BODY=$(echo "$RELEASE_INFO" | jq -r .body)
+17 -11
View File
@@ -156,7 +156,7 @@ name: Auto Release & Publish
on:
pull_request:
types: [closed]
types: [ closed ]
branches:
- main
@@ -207,35 +207,41 @@ jobs:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
# publish-docker:
# uses: ./.github/workflows/docker.yml
# with:
# add_latest: true
# secrets:
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
# publish-docker:
# uses: ./.github/workflows/docker.yml
# with:
# add_latest: true
# secrets:
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
finalize-release:
needs: create-release
runs-on: ubuntu-latest
outputs:
release_tag: ${{ steps.publish_release_step.outputs.release_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Publish GitHub Release
id: publish_release_step
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release edit ${{ needs.create-release.outputs.draft_tag }} --draft=false
OUTPUT=$(gh release edit ${{ needs.create-release.outputs.draft_tag }} --draft=false)
echo "$OUTPUT"
RELEASE_TAG=$(echo "$OUTPUT" | sed -E 's|.*/releases/tag/||')
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
notify-discord:
needs: finalize-release
uses: ./.github/workflows/discord.yml
with:
discord_title: "New Release: v${{ needs.create-release.outputs.draft_tag }}"
release_tag: ${{ needs.create-release.outputs.draft_tag }}
discord_title: "New Release"
discord_color: 3066993
discord_footer: "Portabase"
secrets: