-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
356 additions
and
49 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,38 @@ | ||
name: 'Print Vars' | ||
description: 'Prints github varibles' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: github context | ||
shell: bash | ||
run: echo "${{ toJson(github) }}" | ||
- name: env context | ||
shell: bash | ||
run: echo "${{ toJson(env) }}" | ||
- name: vars context | ||
shell: bash | ||
run: echo "${{ toJson(vars) }}" | ||
- name: job context | ||
shell: bash | ||
run: echo "${{ toJson(job) }}" | ||
- name: steps context | ||
shell: bash | ||
run: echo "${{ toJson(steps) }}" | ||
- name: runner context | ||
shell: bash | ||
run: echo "${{ toJson(runner) }}" | ||
- name: secrets context | ||
shell: bash | ||
run: echo "${{ toJson(secrets) }}" | ||
- name: strategy context | ||
shell: bash | ||
run: echo "${{ toJson(strategy) }}" | ||
- name: matrix context | ||
shell: bash | ||
run: echo "${{ toJson(matrix) }}" | ||
- name: needs context | ||
shell: bash | ||
run: echo "${{ toJson(needs) }}" | ||
- name: inputs context | ||
shell: bash | ||
run: echo "${{ toJson(inputs) }}" |
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,48 @@ | ||
name: consistent_versions | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- '**/package.json' | ||
- 'package.json' | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
ENVIRONMENT: development | ||
GH_TOKEN: ${{ github.token }} | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repo | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Check versions are consistent amongst packages | ||
run: | | ||
# for each package, get the version then filter to unique versions | ||
versions=$(npx --workspaces npm pkg get version | grep "@" | awk '{print $2}' | uniq) | ||
# if more than one version is detected, fail | ||
if [ $(echo "$versions" | wc -l) -gt 1 ]; then | ||
echo "Versions are not consistent amongst packages:" | ||
echo "$versions" | ||
exit 1 | ||
fi | ||
# if version doesn't match the root workspace version, fail | ||
root_version=$(npm pkg get version) | ||
if [ "$versions" != "$root_version" ]; then | ||
echo "Version is not consistent with root workspace version:" | ||
echo "$versions" | ||
echo "$root_version" | ||
exit 1 | ||
fi | ||
# else versions are consistent, pass |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.