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

🔄 Sync with @Andrews-McMeel-Universal/.github #1

Merged
merged 3 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/.templatesyncignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.github/CODEOWNERS
.github/workflows/template-sync.yml
*.ps1
README.md
Secrets-example.json
2 changes: 1 addition & 1 deletion .github/workflows/pr-clean-caches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [closed]
schedule:
- cron: 0 0 * * *
- cron: 0 0 * * 0

jobs:
cleanup:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/template-sync.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔄 Sync with .github repository
name: 🔄 Sync with action_template repository

on:
schedule:
Expand All @@ -24,12 +24,12 @@ jobs:
uses: AndreasAugustin/actions-template-sync@v1.1.1
with:
github_token: ${{ secrets.PAT_ACTION_CI }}
source_repo_path: Andrews-McMeel-Universal/.github
source_repo_path: Andrews-McMeel-Universal/action_template
upstream_branch: main
pr_labels: maintenance
pr_commit_msg: 🔄 Synchronize with @Andrews-McMeel-Universal/.github
pr_title: 🔄 Sync with @Andrews-McMeel-Universal/.github
pr_branch_name_prefix: sync/dotgithub/
pr_commit_msg: 🔄 Synchronize with @Andrews-McMeel-Universal/action_template
pr_title: 🔄 Sync with @Andrews-McMeel-Universal/action_template
pr_branch_name_prefix: sync/action_template/
pr_reviewers: Andrews-McMeel-Universal/devops-engineers
is_dry_run: ${{ inputs.isdryrun || 'false' }}
git_user_name: amutechtest
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
.github/dependabot.yml
.github/labeler.yml
.github/workflows/aks*.yml
.github/release.yml

# Helm
deployments/**/templates/
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ To make `cache-yarn-install` a part of your workflow, just add a step to one of
> Requirement: @setup/node should be run before

Example:

```YAML
- name: Cache Yarn Install
uses: Andrews-McMeel-Universal/cache-yarn-install@v1
Expand All @@ -30,11 +31,11 @@ Example:

## Options

| Variable | Description | Required | `[Default]` |
| -------- | ----------------- | :------: | --------------- |
| `cwd` | Changes node's process.cwd() if the project is not located on the root. Default to process.cwd() | | `.` |
| `cache-prefix` | Add a specific cache-prefix | | `'default'` |
| `cache-npm-cache` | Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version) | | `'true'` |
| `cache-node-modules` | Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch) | | `'false'` |
| `cache-install-state` | Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch) | | `'false'` |
| `enable-corepack` | Enable corepack | | `'true'` |
| Variable | Description | Required | `[Default]` |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | :------: | ----------- |
| `cwd` | Changes node's process.cwd() if the project is not located on the root. Default to process.cwd() | | `.` |
| `cache-prefix` | Add a specific cache-prefix | | `'default'` |
| `cache-npm-cache` | Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version) | | `'true'` |
| `cache-node-modules` | Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch) | | `'false'` |
| `cache-install-state` | Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch) | | `'false'` |
| `enable-corepack` | Enable corepack | | `'true'` |
40 changes: 20 additions & 20 deletions action.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
name: 'Cache Yarn Install'
description: 'Run yarn install with node_modules linker and cache enabled'
name: "Cache Yarn Install"
description: "Run yarn install with node_modules linker and cache enabled"
inputs:
cwd:
description: "Changes node's process.cwd() if the project is not located on the root. Default to process.cwd()"
required: false
default: '.'
default: "."
cache-prefix:
description: 'Add a specific cache-prefix'
description: "Add a specific cache-prefix"
required: false
default: 'default'
default: "default"
cache-npm-cache:
description: 'Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version)'
description: "Cache npm global cache folder often used by node-gyp, prebuild binaries (invalidated on lock/os/node-version)"
required: false
default: 'true'
default: "true"
cache-node-modules:
description: 'Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch)'
description: "Cache node_modules, might speed up link step (invalidated lock/os/node-version/branch)"
required: false
default: 'false'
default: "false"
cache-install-state:
description: 'Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch)'
description: "Cache yarn install state, might speed up resolution step when node-modules cache is activated (invalidated lock/os/node-version/branch)"
required: false
default: 'false'
default: "false"
enable-corepack:
description: 'Enable corepack'
description: "Enable corepack"
required: false
default: 'true'
default: "true"

runs:
using: 'composite'
using: "composite"
steps:
- name: Enable Corepack
if: inputs.enable-corepack == 'true'
Expand All @@ -40,7 +40,7 @@ runs:
shell: bash
working-directory: ${{ inputs.cwd }}
env:
YARN_ENABLE_GLOBAL_CACHE: 'false'
YARN_ENABLE_GLOBAL_CACHE: "false"
run: |
echo "CACHE_FOLDER=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
echo "CURRENT_NODE_VERSION="node-$(node --version)"" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -86,9 +86,9 @@ runs:
run: yarn install --immutable --inline-builds
env:
# Overrides/align yarnrc.yml options (v3, v4) for a CI context
YARN_ENABLE_GLOBAL_CACHE: 'false' # Use local cache folder to keep downloaded archives
YARN_ENABLE_MIRROR: 'false' # Prevent populating global cache for caches misses (local cache only)
YARN_NM_MODE: 'hardlinks-local' # Reduce node_modules size
YARN_INSTALL_STATE_PATH: '.yarn/ci-cache/install-state.gz' # Might speed up resolution step when node_modules present
YARN_ENABLE_GLOBAL_CACHE: "false" # Use local cache folder to keep downloaded archives
YARN_ENABLE_MIRROR: "false" # Prevent populating global cache for caches misses (local cache only)
YARN_NM_MODE: "hardlinks-local" # Reduce node_modules size
YARN_INSTALL_STATE_PATH: ".yarn/ci-cache/install-state.gz" # Might speed up resolution step when node_modules present
# Other environment variables
HUSKY: '0' # By default do not run HUSKY install
HUSKY: "0" # By default do not run HUSKY install
Loading