-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(git-tools): Added reusable GitHub
workflows
and actions
- Loading branch information
1 parent
f9cf757
commit 1c9a539
Showing
62 changed files
with
11,594 additions
and
5,326 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
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 |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
**/Thumbs.db/** | ||
**/.tamagui* | ||
**/.next* | ||
**/CODEOWNERS |
This file was deleted.
Oops, something went wrong.
Validating CODEOWNERS rules …
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 |
---|---|---|
@@ -1 +1,3 @@ | ||
* @sullivanpj | ||
- @sullivanpj | ||
|
||
/docs/ @storm-software/docs |
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# Note: This is a composite GitHub Actions, it should do all env setup, caching an so on, so other pipelines can just compose their own stuff on top of that. | ||
# Docs: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
|
||
name: "Setup Action" | ||
description: "A composite action configuration used across many Storm Software repos to setup: checkout, Node.js, a package manager, and npm registry configuration." | ||
inputs: | ||
workingDirectory: | ||
description: "The working directory of your node package" | ||
required: false | ||
default: ./ | ||
packageManager: | ||
description: Package manager | ||
required: false | ||
default: pnpm | ||
packageManagerVersion: | ||
description: Package manager version | ||
required: false | ||
default: 8.10.2 | ||
stormBot: | ||
description: The github username of the Storm bot | ||
required: false | ||
default: "" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Cancel Previous Runs | ||
uses: styfle/cancel-workflow-action@0.12.1 | ||
continue-on-error: true | ||
with: | ||
access_token: ${{ github.token }} | ||
|
||
- name: Check pnpm version | ||
shell: bash | ||
id: pnpm | ||
if: inputs.packageManager == 'pnpm' | ||
working-directory: ${{ inputs.workingDirectory }} | ||
run: | | ||
PNPM_VERSION=${PNPM_VERSION:-7.30.5} | ||
PKG_JSON=$(cat package.json | jq -r '.packageManager' | awk -F@ '{print $2}') | ||
if [ ! -z $PKG_JSON ]; then | ||
PNPM_VERSION=$PKG_JSON | ||
fi | ||
if [ ! -z {{inputs.packageManager}} ]; then | ||
PNPM_VERSION=${{ inputs.packageManagerVersion }} | ||
fi | ||
echo "Using PNPM version $PNPM_VERSION" | ||
echo "version=$PNPM_VERSION" >> $GITHUB_OUTPUT | ||
- name: Setup ${{ inputs.packageManager }} | ||
id: pnpm_setup | ||
if: inputs.packageManager == 'pnpm' | ||
uses: pnpm/action-setup@v3.0.0 | ||
with: | ||
version: ${{ steps.pnpm.outputs.version }} | ||
run_install: false | ||
package_json_file: ${{ inputs.workingDirectory }}/package.json | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.nodeVersion }} | ||
cache: ${{ inputs.packageManager }} | ||
cache-dependency-path: | | ||
**/pnpm-lock.yaml | ||
**/yarn.lock | ||
patches/** | ||
- name: Install yarn package manager | ||
shell: bash | ||
if: inputs.packageManager == 'yarn' && inputs.packageManagerVersion == '' | ||
run: yarn install --ignore-engines --frozen-lockfile --immutable | ||
working-directory: ${{ inputs.workingDirectory }} | ||
|
||
- name: Install modern yarn package manager | ||
shell: bash | ||
if: inputs.packageManager == 'yarn' && inputs.packageManagerVersion == 'modern' | ||
run: corepack enable && yarn | ||
working-directory: ${{ inputs.workingDirectory }} | ||
|
||
- name: Install pnpm package manager | ||
shell: bash | ||
if: inputs.packageManager == 'pnpm' | ||
run: pnpm install --no-frozen-lockfile | ||
working-directory: ${{ inputs.workingDirectory }} | ||
|
||
- name: Get pnpm store directory | ||
if: inputs.packageManager == 'pnpm' | ||
shell: bash | ||
id: pnpm-cache | ||
run: | | ||
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- name: Set up npm registry | ||
uses: actions/setup-node@v4 | ||
if: inputs.packageManager == 'pnpm' | ||
with: | ||
registry-url: https://registry.npmjs.org/ | ||
node-version-file: .github/.nvmrc | ||
cache: pnpm | ||
cache-dependency-path: pnpm-lock.yaml | ||
|
||
- name: Setup pnpm config registry | ||
if: inputs.packageManager == 'pnpm' | ||
run: pnpm config set registry https://registry.npmjs.org | ||
shell: bash |
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
Oops, something went wrong.