Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added github actions periodic build #2406

Merged
merged 31 commits into from
Nov 15, 2024
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
55b6ccf
Added github actions periodic build
Nov 7, 2024
d1c884e
Changed yarn dev to yarn build
Nov 7, 2024
2f1dc57
Changed name
Nov 7, 2024
7feb2aa
Added env
Nov 7, 2024
99abaae
Make yarn and build run from copy of examples folder
Nov 7, 2024
692854d
Put new graphcommerce -build in tmp folder
Nov 7, 2024
b175ce6
Removed runner.path
Nov 7, 2024
aafd449
Fixed invalid notification end
Nov 7, 2024
672ea6b
Changed channel for testing
Nov 7, 2024
248dc94
Added statement to start building on test branche
Nov 7, 2024
dc67fd2
Copy current branche examples folder to create new tmp/folder
Nov 7, 2024
e8d0514
Readded the git clone
Nov 7, 2024
963d1bd
Cd into right folder before doing yarn commands
Nov 7, 2024
39e5fc7
Switched setup node to V3
Nov 7, 2024
c254c57
Removed yarn from actions setup-node
Nov 7, 2024
6d191e7
Added yarn install && yarn postinstall
Nov 7, 2024
5d7d3b8
Readded node 20
Nov 7, 2024
8f4ade2
Added matrix to try building with different versions of node
Nov 7, 2024
c1d0528
Added continue on error so all the node version will be tried
Nov 7, 2024
93e84be
Notify slack when one of the jobs fails
Nov 7, 2024
51597ee
Added failure flag to make sure the build fails if any of the matrix …
Nov 7, 2024
0b63bc2
Added failure flag to make sure the build fails if any of the matrix …
Nov 7, 2024
9cf746a
Added failure flag to make sure the build fails if any of the matrix …
Nov 7, 2024
12a3ac5
Check whats in needs.publish
Nov 7, 2024
a161946
Try using artifacts to set data for a matrix job
Nov 8, 2024
5bf6167
Implemented pr feedback
Nov 8, 2024
dcdc475
Removed incorrect output
Nov 8, 2024
7405973
Adjusted scope
Nov 8, 2024
b87a7cd
Set periodic-build.yml to canary pushes
Nov 8, 2024
962fac0
Changed message channel to GC
Nov 8, 2024
a3818d8
Changed message channel to GC-build
Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/periodic-build.yml
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-main
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: graphcommerce-build
message: Graphcommerce start building
notifyOnlyOnFailure: true

publish:
strategy:
matrix:
version: [18, 20]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
paales marked this conversation as resolved.
Show resolved Hide resolved
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: graphcommerce-build
message: "One or more Node.js versions failed in the periodic build"
notifyOnlyOnFailure: true
Loading