-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made changes to periodic-build file for canary
- Loading branch information
Renzo van Hootegem
committed
Nov 8, 2024
1 parent
81ace02
commit f3b68fc
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Periodic build | ||
on: | ||
schedule: | ||
- cron: 0 0 * * * | ||
push: | ||
branches: | ||
- 'canary' | ||
concurrency: | ||
group: release-canary | ||
jobs: | ||
notify-start: | ||
name: Notify release start | ||
uses: ho-nl/release-slack-action/.github/workflows/notify-slack-start.yml@main | ||
secrets: | ||
slackToken: ${{ secrets.SLACK_BOT_RELEASE_TOKEN }} | ||
with: | ||
channel: slack-test-messages | ||
message: Graphcommerce start building | ||
notifyOnlyOnFailure: true | ||
|
||
publish: | ||
strategy: | ||
matrix: | ||
version: [18, 20, 22] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
path: graphcommerce | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.version }} | ||
registry-url: 'https://registry.npmjs.org' | ||
scope: 'graphcommerce' | ||
|
||
- name: Prepare and build graphcommerce | ||
run: | | ||
cp -R graphcommerce/examples/magento-graphcms/. graphcommerce-build | ||
cd graphcommerce-build | ||
yarn | ||
yarn codegen | ||
yarn build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# notify-end will run only if any publish job failed | ||
notify-end: | ||
if: always() | ||
needs: [notify-start, publish] | ||
name: Notify release end | ||
uses: ho-nl/release-slack-action/.github/workflows/notify-slack-end.yml@main | ||
secrets: | ||
slackToken: ${{ secrets.SLACK_BOT_RELEASE_TOKEN }} | ||
with: | ||
time: ${{ needs.notify-start.outputs.time }} | ||
result: ${{ needs.publish.result }} | ||
channel: slack-test-messages | ||
message: "One or more Node.js versions failed in the periodic canary build" | ||
notifyOnlyOnFailure: true |