The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
chore(ci): update GitHub Actions workflows for improved reliability a… (#14921)
Antoine Moreaux5300ec530967
diff --git a/.github/workflows/ci-release-create.yaml b/.github/workflows/ci-release-create.yamlindex 7dc496fcf5f..0e37e5b3e74 100644--- a/.github/workflows/ci-release-create.yaml+++ b/.github/workflows/ci-release-create.yaml@@ -18,24 +18,33 @@ on:default: truedescription: Create a release after merging the PR+defaults:+ run:+ shell: bash --noprofile --norc -euo pipefail {0}+jobs:create_pr:timeout-minutes: 10runs-on: ubuntu-lateststeps:- name: Checkout- uses: actions/checkout@v2+ uses: actions/checkout@v4with:ref: ${{ github.event.inputs.ref }}- name: Sanitize versionid: sanitize+ env:+ RAW_VERSION: ${{ github.event.inputs.version }}run: |- echo version=$(echo ${{ github.event.inputs.version }} | sed 's/^v//') >> $GITHUB_OUTPUT+ VERSION="${RAW_VERSION#v}"+ printf 'version=%s\n' "$VERSION" >> "$GITHUB_OUTPUT"- name: Update versions+ env:+ VERSION: ${{ steps.sanitize.outputs.version }}run: |- echo ${{ steps.sanitize.outputs.version }} > version.txt+ printf '%s\n' "$VERSION" > version.txt- name: Create Pull Requestuses: peter-evans/create-pull-request@v6diff --git a/.github/workflows/ci-release-merge.yaml b/.github/workflows/ci-release-merge.yamlindex e204949aff4..a398fc96a9d 100644--- a/.github/workflows/ci-release-merge.yaml+++ b/.github/workflows/ci-release-merge.yaml@@ -8,6 +8,10 @@ on:types:- closed+defaults:+ run:+ shell: bash --noprofile --norc -euo pipefail {0}+jobs:tag_and_release:timeout-minutes: 10@@ -16,33 +20,40 @@ jobs:steps:- name: Check PR Authorid: check_author+ env:+ PR_AUTHOR: ${{ github.event.pull_request.user.login }}run: |- if [[ "${{ github.event.pull_request.user.login }}" != "github-actions[bot]" ]]; then- echo "PR author (${AUTHOR}) is not trusted. Exiting."+ set -euo pipefail+ if [[ "$PR_AUTHOR" != "github-actions[bot]" ]]; then+ echo "PR author ($PR_AUTHOR) is not trusted. Exiting."exit 1fi- name: Checkout- uses: actions/checkout@v2+ uses: actions/checkout@v4with:ref: main- name: Get version from PR titleid: extract_version+ env:+ PR_TITLE: ${{ github.event.pull_request.title }}run: |- VERSION=$(echo "${{ github.event.pull_request.title }}" | sed -n 's/.*Release v\([0-9.]*\).*/\1/p')+ set -euo pipefail+ VERSION=$(printf '%s' "$PR_TITLE" | sed -n 's/.*Release v\([0-9][0-9.]*\).*/\1/p')if [ -z "$VERSION" ]; thenecho "No valid version found in PR title. Exiting."exit 1fi- echo "VERSION=$VERSION" >> $GITHUB_ENV+ printf 'VERSION=%s\n' "$VERSION" >> "$GITHUB_ENV"- name: Push new tagrun: |+ set -euo pipefailgit config --global user.name 'Github Action Deploy'git config --global user.email '[email protected]'- git tag v${{ env.VERSION }}- git push origin v${{ env.VERSION }}+ git tag "v${{ env.VERSION }}"+ git push origin "v${{ env.VERSION }}"- uses: release-drafter/release-drafter@v5if: contains(github.event.pull_request.labels.*.name, 'create_release')