mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
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 --------- Co-authored-by: charlesgauthereau <charles.gauthereau@soluce-technologies.com>
This commit is contained in:
co-authored by
charlesgauthereau
parent
01b7a58c75
commit
94b36c1622
@@ -12,12 +12,11 @@ on:
|
|||||||
discord_footer:
|
discord_footer:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
discord_webhook:
|
secrets:
|
||||||
|
DISCORD_WEBHOOK:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
GH_TOKEN:
|
||||||
gh_token:
|
|
||||||
required: true
|
required: true
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
notify-discord:
|
notify-discord:
|
||||||
@@ -25,8 +24,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Send Discord Notification
|
- name: Send Discord Notification
|
||||||
env:
|
env:
|
||||||
DISCORD_WEBHOOK: ${{ inputs.discord_webhook }}
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
GH_TOKEN: ${{ inputs.gh_token }}
|
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
RELEASE_INFO=$(gh release view "${{ github.ref_name }}" -R ${{ github.repository }} --json name,url,body,author)
|
RELEASE_INFO=$(gh release view "${{ github.ref_name }}" -R ${{ github.repository }} --json name,url,body,author)
|
||||||
|
|
||||||
|
|||||||
+109
-21
@@ -67,12 +67,96 @@
|
|||||||
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
#name: Auto Release & Publish
|
||||||
|
#
|
||||||
|
#on:
|
||||||
|
# pull_request:
|
||||||
|
# types: [ closed ]
|
||||||
|
# branches:
|
||||||
|
# - main
|
||||||
|
#
|
||||||
|
#permissions:
|
||||||
|
# contents: write
|
||||||
|
# packages: write
|
||||||
|
#
|
||||||
|
#jobs:
|
||||||
|
# release:
|
||||||
|
# if: github.event.pull_request.merged == true
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# outputs:
|
||||||
|
# draft_tag: ${{ steps.release_step.outputs.draft_tag }}
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/create-github-app-token@v1
|
||||||
|
# id: app-token
|
||||||
|
# with:
|
||||||
|
# app-id: ${{ vars.APP_ID }}
|
||||||
|
# private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
#
|
||||||
|
# - uses: actions/checkout@v4
|
||||||
|
# with:
|
||||||
|
# fetch-depth: 0
|
||||||
|
# token: ${{ steps.app-token.outputs.token }}
|
||||||
|
# ref: main
|
||||||
|
#
|
||||||
|
# - uses: pnpm/action-setup@v4
|
||||||
|
# - uses: actions/setup-node@v4
|
||||||
|
# with:
|
||||||
|
# node-version: "lts/*"
|
||||||
|
# cache: "pnpm"
|
||||||
|
#
|
||||||
|
# - run: pnpm install --frozen-lockfile
|
||||||
|
#
|
||||||
|
# - run: |
|
||||||
|
# git config --global user.name 'github-actions[bot]'
|
||||||
|
# git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
||||||
|
#
|
||||||
|
# - name: Run release-it
|
||||||
|
# id: release_step
|
||||||
|
# run: |
|
||||||
|
# git pull origin main
|
||||||
|
# OUTPUT=$(pnpm exec release-it --ci)
|
||||||
|
# echo "$OUTPUT"
|
||||||
|
# # Extract the untagged draft release name
|
||||||
|
# DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
|
||||||
|
# echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# # - name: Build & publish Docker
|
||||||
|
# # uses: ./.github/workflows/docker.yml
|
||||||
|
# # with:
|
||||||
|
# # add_latest: true
|
||||||
|
# # secrets:
|
||||||
|
# # DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
||||||
|
# # DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
||||||
|
#
|
||||||
|
# - name: Publish GitHub Release
|
||||||
|
# env:
|
||||||
|
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# run: |
|
||||||
|
# gh release edit ${{ steps.release_step.outputs.draft_tag }} --draft=false
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# - name: Notify Discord
|
||||||
|
# uses: ./.github/workflows/discord.yml
|
||||||
|
# with:
|
||||||
|
# discord_title: "New Release: v${{ steps.bump.outputs.version }}"
|
||||||
|
# discord_color: 3066993
|
||||||
|
# discord_footer: "Portabase"
|
||||||
|
# secrets:
|
||||||
|
# DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
||||||
name: Auto Release & Publish
|
name: Auto Release & Publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [ closed ]
|
types: [closed]
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
@@ -81,7 +165,7 @@ permissions:
|
|||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
create-release:
|
||||||
if: github.event.pull_request.merged == true
|
if: github.event.pull_request.merged == true
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
outputs:
|
outputs:
|
||||||
@@ -117,35 +201,39 @@ jobs:
|
|||||||
git pull origin main
|
git pull origin main
|
||||||
OUTPUT=$(pnpm exec release-it --ci)
|
OUTPUT=$(pnpm exec release-it --ci)
|
||||||
echo "$OUTPUT"
|
echo "$OUTPUT"
|
||||||
# Extract the untagged draft release name
|
|
||||||
DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
|
DRAFT_TAG=$(echo "$OUTPUT" | grep -o 'releases/tag/[^ ]*' | sed 's|releases/tag/||')
|
||||||
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
|
echo "draft_tag=$DRAFT_TAG" >> $GITHUB_OUTPUT
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
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 }}
|
||||||
|
|
||||||
|
finalize-release:
|
||||||
# - name: Build & publish Docker
|
needs: create-release
|
||||||
# uses: ./.github/workflows/docker.yml
|
runs-on: ubuntu-latest
|
||||||
# with:
|
steps:
|
||||||
# add_latest: true
|
|
||||||
# secrets:
|
|
||||||
# DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME_2 }}
|
|
||||||
# DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD_2 }}
|
|
||||||
|
|
||||||
- name: Publish GitHub Release
|
- name: Publish GitHub Release
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
gh release edit ${{ steps.release_step.outputs.draft_tag }} --draft=false
|
gh release edit ${{ needs.create-release.outputs.draft_tag }} --draft=false
|
||||||
|
|
||||||
|
|
||||||
- name: Notify Discord
|
|
||||||
uses: ./.github/workflows/discord.yml
|
notify-discord:
|
||||||
with:
|
needs: create-release
|
||||||
discord_title: "New Release: v${{ steps.bump.outputs.version }}"
|
uses: ./.github/workflows/discord.yml
|
||||||
discord_color: 3066993
|
with:
|
||||||
discord_footer: "Portabase"
|
discord_title: "New Release: v${{ needs.create-release.outputs.draft_tag }}"
|
||||||
discord_webhook: ${{ secrets.DISCORD_WEBHOOK }}
|
discord_color: 3066993
|
||||||
gh_token: ${{ secrets.GITHUB_TOKEN }}
|
discord_footer: "Portabase"
|
||||||
|
secrets:
|
||||||
|
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Reference in New Issue
Block a user