Skip to content

Commit

Permalink
Merge pull request #505 from input-output-hk/ci/fail-instead-of-cance…
Browse files Browse the repository at this point in the history
…llation

ci: nightly and release workflow fixes
  • Loading branch information
rhyslbw committed Nov 7, 2022
2 parents 78d6753 + 42e71ce commit 4bc5481
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/nightly-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ on:
- completed

jobs:
cancel-self-run:
name: "Cancel the self workflow run"
fail:
name: "Fail the workflow run by exiting"
if: ${{ github.event_name != 'workflow_dispatch' && github.event.workflow_run.conclusion != 'success' }}
runs-on: ubuntu-20.04
steps:
- name: "Cancel the self workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: self
token: ${{ secrets.BOT_GH_TOKEN }}
notifyPRCancel: false
- name: "exit 1"
run: exit 1

publish:
runs-on: ubuntu-20.04
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/nightly-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,13 @@ on:
- completed

jobs:
cancel-self-run:
name: "Cancel the self workflow run"
fail:
name: "Fail the workflow run by exiting"
if: ${{ github.event_name != 'workflow_dispatch' && github.event.workflow_run.conclusion != 'success' }}
runs-on: ubuntu-20.04
steps:
- name: "Cancel the self workflow run"
uses: potiuk/cancel-workflow-runs@master
with:
cancelMode: self
token: ${{ secrets.BOT_GH_TOKEN }}
notifyPRCancel: false
- name: "exit 1"
run: exit 1

test:
strategy:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ jobs:
# Base on nightly branch versions
git merge --squash nightly
# Omit nighly release CHANGELOG changes
git checkout HEAD packages/*/CHANGELOG.md
git restore --source master packages/*/CHANGELOG.md
git add .
# Test build to reduce chance of failure after creating a GH Release
yarn build
# Publish
yarn publish:release --sign-git-commit --loglevel silly
# Merge package.json/yarn.lock/CHANGELOG back to nightly
Expand All @@ -58,4 +61,4 @@ jobs:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
# Used for making a release
GH_TOKEN: ${{ github.token }}
GH_TOKEN: ${{ secrets.BOT_GH_TOKEN }}

0 comments on commit 4bc5481

Please sign in to comment.