-
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.
- Loading branch information
1 parent
59103f4
commit bad2de1
Showing
5 changed files
with
32 additions
and
22 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
*.ps1 | ||
README.md | ||
Secrets-example.json | ||
.github/CODEOWNERS | ||
.github/workflows/template-sync.yml | ||
action.yaml | ||
README.md |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: 🔄 Sync with .github repository | ||
name: 🔄 Sync with action_template repository | ||
|
||
on: | ||
schedule: | ||
|
@@ -24,11 +24,11 @@ jobs: | |
uses: AndreasAugustin/[email protected] | ||
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_commit_msg: 🔄 Synchronize with @Andrews-McMeel-Universal/action_template | ||
pr_title: 🔄 Sync with @Andrews-McMeel-Universal/action_template | ||
pr_branch_name_prefix: sync/dotgithub/ | ||
is_dry_run: ${{ inputs.isdryrun || 'false' }} | ||
git_user_name: amutechtest | ||
|
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,23 +1,19 @@ | ||
# Action Template | ||
# Cache Next Build Action | ||
|
||
GitHub action to echo "Hello World" | ||
|
||
Template repository for reusable GitHub actions | ||
|
||
You can use this guide to figure out how to update your application using the template: [Creating a new repository from a template](https://amuniversal.atlassian.net/wiki/spaces/TD/pages/3419832336/Creating+a+New+GitHub+Repository#Creating-a-new-repository-from-a-template) | ||
GitHub action to install Node dependencies and cache the result | ||
|
||
## Getting Started | ||
|
||
```bash | ||
git clone https://github.com/Andrews-McMeel-Universal/action_template | ||
git clone https://github.com/Andrews-McMeel-Universal/cache-next-build | ||
``` | ||
|
||
## Installation | ||
|
||
To make `action_template` a part of your workflow, just add a step to one of your workflows in your `.github/workflows/` directory in your GitHub repository. | ||
To make `cache-next-build` a part of your workflow, just add a step to one of your workflows in your `.github/workflows/` directory in your GitHub repository. | ||
|
||
## Options | ||
|
||
| Variable | Description | Required | `[Default]` | | ||
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------: | ------------------------------------- | | ||
| `input` | Input Description | x | `Default Value` | | ||
| `N/A` | N/A | N/A | `N/A` | |
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,12 +1,25 @@ | ||
name: Default GitHub Action | ||
name: Cache Next Build | ||
|
||
description: Default GitHub Action that outputs "Hello World" | ||
description: Builds the Next.js app and caches the result | ||
|
||
branding: | ||
color: purple | ||
icon: unlock | ||
color: yellow | ||
icon: cpu | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: echo "Hello World" >> $GITHUB_OUTPUT | ||
- name: Cache build | ||
id: build-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
${{ github.workspace }}/.next | ||
key: build-${{ hashFiles('**/.env','**/*.lock','**/*.[jt]s*') }} | ||
|
||
# Builds the app if the cache was broken | ||
# NOTE: The .env file is added as a path to the build-cache so when | ||
# yarn build runs, it will have the proper environment variables | ||
- name: Build app | ||
if: steps.build-cache.outputs.cache-hit != 'true' | ||
run: yarn build | ||
shell: bash |