Skip to content

Commit 7dc4621

Browse files
committed
cicd: make pipeline succeed, even if release is not approved
1 parent 4b2b787 commit 7dc4621

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,16 @@ jobs:
124124
if: github.ref == 'refs/heads/main'
125125
needs: npm-publish-elements-snapshot
126126
runs-on: ubuntu-latest
127+
continue-on-error: true
127128
environment: release-approval
129+
outputs:
130+
approved: ${{ steps.approval.outputs.approved }}
128131
steps:
129132
- name: Approve release
130-
run:
131-
echo "Release approved, proceeding with npm publish and production
132-
deployment"
133+
id: approval
134+
run: |
135+
echo "approved=true" >> $GITHUB_OUTPUT
136+
echo "Release approved, proceeding"
133137
134138
build-pages:
135139
if: github.ref == 'refs/heads/main'
@@ -181,7 +185,8 @@ jobs:
181185
uses: actions/deploy-pages@v4
182186

183187
npm-release-core:
184-
if: github.ref == 'refs/heads/main'
188+
if:
189+
github.ref == 'refs/heads/main' && needs.approve-release.outputs.approved == 'true'
185190
needs: [build, npm-publish-core-snapshot, approve-release]
186191
runs-on: ubuntu-latest
187192
outputs:
@@ -203,7 +208,6 @@ jobs:
203208
tag: latest
204209

205210
npm-release-elements:
206-
if: github.ref == 'refs/heads/main'
207211
needs: [build, npm-publish-elements-snapshot, npm-release-core]
208212
runs-on: ubuntu-latest
209213
outputs:

0 commit comments

Comments
 (0)