forked from shimataro/ssh-key-action
-
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.
Merge remote-tracking branch 'upstream/v2' into sync-upstream
- Loading branch information
Showing
21 changed files
with
4,317 additions
and
5,835 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,25 @@ | ||
# https://docs.github.com/en/actions/creating-actions/creating-a-composite-action | ||
name: Cache NPM | ||
description: Composite action (cache NPM) | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# https://github.com/actions/cache/blob/master/examples.md#node---npm | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter | ||
- name: Get NPM cache directory | ||
run: echo "NPM_CACHE_DIRECTORY=$(npm config get cache)" >> ${{ github.env }} # use "github.env" instead of "github.output"; if use "github.output", "Warning: Input required and not supplied: path" is displayed on post-process | ||
shell: pwsh # use PowerShell; Bash doesn't work on Windows because the value of "github.env" is like "D:\a\_temp\_runner_file_commands\set_env_XXX". | ||
|
||
- name: Get Node.js version | ||
run: echo "NODEJS_VERSION=$(node -v)" >> ${{ github.env }} | ||
shell: pwsh | ||
|
||
- name: Cache NPM modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.NPM_CACHE_DIRECTORY }} | ||
key: npm-${{ runner.os }}-${{ runner.arch }}-${{ env.NODEJS_VERSION }}-${{ hashFiles('package-lock.json') }} | ||
restore-keys: | | ||
npm-${{ runner.os }}-${{ runner.arch }}-${{ env.NODEJS_VERSION }}- | ||
npm-${{ runner.os }}-${{ runner.arch }} |
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 |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
ssh-pkcs8: | ||
name: Connect to github.com (PKCS8 format) | ||
|
@@ -64,7 +64,7 @@ jobs: | |
key: ${{ secrets.SSH_KEY_PKCS8 }} | ||
known_hosts: unnecessary | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
ssh-rfc4716: | ||
name: Connect to github.com (RFC4716 format) | ||
|
@@ -82,7 +82,7 @@ jobs: | |
key: ${{ secrets.SSH_KEY_RFC4716 }} | ||
known_hosts: unnecessary | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_replace-key_exists: | ||
name: if_key_exists=replace / key exists | ||
|
@@ -99,14 +99,14 @@ jobs: | |
with: | ||
key: "dummy" # replaced | ||
known_hosts: unnecessary | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key (replaces existing key) | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
if_key_exists: replace | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_replace-key_doesnt_exist: | ||
name: if_key_exists=replace / key doesn't exist | ||
|
@@ -118,14 +118,14 @@ jobs: | |
if: ${{ inputs.package_installation_command != '' }} | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
if_key_exists: replace | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_ignore-key_exists: | ||
name: if_key_exists=ignore / key exists | ||
|
@@ -137,19 +137,19 @@ jobs: | |
if: ${{ inputs.package_installation_command != '' }} | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
- name: Install SSH key (dummy) | ||
- name: Install SSH key | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key (does nothing) | ||
uses: ./. | ||
with: | ||
key: "dummy" # ignored | ||
known_hosts: unnecessary | ||
if_key_exists: ignore | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_ignore-key_doesnt_exist: | ||
name: if_key_exists=ignore / key doesn't exist | ||
|
@@ -161,14 +161,14 @@ jobs: | |
if: ${{ inputs.package_installation_command != '' }} | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
if_key_exists: ignore | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_fail-key_exists: | ||
name: if_key_exists=fail / key exists | ||
|
@@ -180,20 +180,20 @@ jobs: | |
if: ${{ inputs.package_installation_command != '' }} | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
- name: Install SSH key (dummy) | ||
- name: Install SSH key | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key (fails) | ||
uses: ./. | ||
with: | ||
key: "dummy" # ignored | ||
key: "dummy" # fails | ||
known_hosts: unnecessary | ||
if_key_exists: fail | ||
continue-on-error: true | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp | ||
|
||
key_if_exists_fail-key_doesnt_exist: | ||
name: if_key_exists=fail / key doesn't exist | ||
|
@@ -205,11 +205,11 @@ jobs: | |
if: ${{ inputs.package_installation_command != '' }} | ||
- name: Checkout source codes | ||
uses: actions/checkout@v3 | ||
- name: Install SSH key (replace) | ||
- name: Install SSH key | ||
uses: ./. | ||
with: | ||
key: ${{ secrets.SSH_KEY_PEM }} | ||
known_hosts: unnecessary | ||
if_key_exists: fail | ||
- name: git clone through SSH | ||
run: git clone [email protected]:niaid/ssh-key-action.git tmp | ||
run: git clone [email protected]:niaid/monarch-actions-key-writer.git tmp |
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
Oops, something went wrong.