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

F160 - US396 - Sync upstream #12

Merged
merged 50 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
5bd2f03
Merge pull request #117 from shimataro/develop
shimataro Feb 8, 2020
262770b
Merge pull request #126 from shimataro/develop
shimataro Mar 14, 2020
147b45c
Merge pull request #129 from shimataro/develop
shimataro Apr 12, 2020
8ddce4e
Merge pull request #138 from shimataro/develop
shimataro Jun 6, 2020
6f350ca
Merge pull request #154 from shimataro/develop
shimataro Aug 15, 2020
0bbd533
Merge pull request #178 from shimataro/develop
shimataro Feb 27, 2021
ce5317e
Merge pull request #183 from shimataro/develop
shimataro Mar 21, 2021
3c9b0fc
Merge pull request #190 from shimataro/develop
shimataro Aug 1, 2021
adea214
Feature/refactor (#209)
shimataro Oct 30, 2022
1926ba6
update dependencies (#211)
shimataro Oct 30, 2022
fc21805
Update nodejs version to 16 (#208) (#216)
shimataro Oct 30, 2022
53a7c26
Feature/runners (#217)
shimataro Oct 30, 2022
bcb314e
fix usage of rsync (#218)
shimataro Oct 30, 2022
1512ade
Feature/GitHub key (#122)
shimataro Nov 2, 2022
a3a8a38
update dependencies (#220)
shimataro Nov 2, 2022
193316a
version 2.4.0 (#221)
shimataro Nov 2, 2022
86a65fd
Merge pull request #222 from shimataro/develop
shimataro Nov 2, 2022
7cccbd3
add cleanup process (#224)
shimataro Dec 19, 2022
da84e6b
Feature/ci (#225)
shimataro Dec 20, 2022
c8a5755
set workflow name (#226)
shimataro Dec 21, 2022
d3bad32
update dependencies (#227)
shimataro Dec 21, 2022
0037643
update dependencies (#228)
shimataro Dec 24, 2022
7036694
version 2.5.0 (#229)
shimataro Dec 24, 2022
02d189f
Merge pull request #230 from shimataro/develop
shimataro Dec 24, 2022
18601dc
Feature/update gh key (#238)
shimataro Mar 24, 2023
699cc3a
version 2.5.1 (#239)
shimataro Mar 24, 2023
685d0f2
Merge pull request #240 from shimataro/develop
shimataro Mar 24, 2023
f5671c0
update dependencies (#241)
shimataro Mar 24, 2023
2983fc4
Feature/remove old runner (#249)
shimataro Oct 9, 2023
31d4b8b
backup & restore (#251)
shimataro Oct 10, 2023
6948892
use module files (#252)
shimataro Oct 10, 2023
00676f1
use `os.homedir()` in order to get home directory (#253)
shimataro Oct 10, 2023
51874aa
exit if differ (#254)
shimataro Oct 10, 2023
ab731d2
update dependencies (#255)
shimataro Oct 10, 2023
ccfb951
fix; files that didn't backed up is not removed in "post" phase (#256)
shimataro Oct 11, 2023
a9c5970
version 2.6.0 (#257)
shimataro Oct 11, 2023
d05e1bd
Merge pull request #258 from shimataro/develop
shimataro Oct 11, 2023
18e8292
update release script (#259)
shimataro Oct 11, 2023
b49a036
fix; JSON parse error on exit, if `if_key_exists`=`fail` and key exis…
shimataro Oct 12, 2023
f848d33
fix; release script error (#261)
shimataro Oct 12, 2023
c858f81
update dependencies (#262)
shimataro Oct 13, 2023
9e1a5e7
use cache for npm (#263)
shimataro Oct 13, 2023
38b53cb
version 2.6.1 (#264)
shimataro Oct 13, 2023
8f0e25e
Feature/node20 (#268)
shimataro Feb 11, 2024
9383557
update dependencies (#269)
shimataro Feb 11, 2024
d4fffb5
version 2.7.0 (#270)
shimataro Feb 11, 2024
f4d9ff5
Merge remote-tracking branch 'upstream/v2' into sync-upstream
jwj019 Jun 12, 2024
f3ece36
Remove centos8 checks
jwj019 Jun 12, 2024
d9bd883
Update Alphine
jwj019 Jun 12, 2024
02802e7
Correct names in scripts
jwj019 Jun 12, 2024
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
25 changes: 25 additions & 0 deletions .github/actions/cache-npm/action.yml
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 }}
24 changes: 13 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,31 @@ jobs:
strategy:
matrix:
os:
- Windows-2019
- Windows-2022
- macOS-10.15
- macOS-11
- macOS-12
- Ubuntu-18.04
- Ubuntu-20.04
- Ubuntu-22.04
- windows-2019
- windows-2022
- macos-11
- macos-12
- ubuntu-20.04
- ubuntu-22.04
nodejs:
- 16
- 20
fail-fast: false
steps:
- name: Turn off auto-crlf
run: git config --global core.autocrlf false
- name: Checkout source codes
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.nodejs }}
- name: Cache NPM
uses: ./.github/actions/cache-npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Exit if differ (forgot to commit dist dir?)
run: git diff --exit-code --quiet
- name: Verify
run: npm run verify
36 changes: 18 additions & 18 deletions .github/workflows/reusable-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
key: ${{ secrets.SSH_KEY_PEM }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

ssh-pkcs8:
name: Connect to github.com (PKCS8 format)
Expand All @@ -64,7 +64,7 @@ jobs:
key: ${{ secrets.SSH_KEY_PKCS8 }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

ssh-rfc4716:
name: Connect to github.com (RFC4716 format)
Expand All @@ -82,7 +82,7 @@ jobs:
key: ${{ secrets.SSH_KEY_RFC4716 }}
known_hosts: unnecessary
- name: git clone through SSH
run: git clone git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_replace-key_exists:
name: if_key_exists=replace / key exists
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_replace-key_doesnt_exist:
name: if_key_exists=replace / key doesn't exist
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_ignore-key_exists:
name: if_key_exists=ignore / key exists
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_ignore-key_doesnt_exist:
name: if_key_exists=ignore / key doesn't exist
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_fail-key_exists:
name: if_key_exists=fail / key exists
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp

key_if_exists_fail-key_doesnt_exist:
name: if_key_exists=fail / key doesn't exist
Expand All @@ -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 git@github.com:niaid/ssh-key-action.git tmp
run: git clone git@github.com:niaid/monarch-actions-key-writer.git tmp
8 changes: 4 additions & 4 deletions .github/workflows/verify-on-container-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
- ubuntu-20.04
- ubuntu-22.04
docker_image:
- alpine:3.10
- alpine:3.11
- alpine:3.12
- alpine:3.13
- alpine:3.17
- alpine:3.18
- alpine:3.19
- alpine:3.20
uses: "./.github/workflows/reusable-verify.yml"
with:
os: ${{ matrix.os }}
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/verify-on-container-centos.yml

This file was deleted.

28 changes: 23 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.7.0] - 2024-02-11

### Others

* Update to Node.js v20 (thanks [@princemaple](https://github.com/princemaple))
* drop old containers; Ubuntu 16.04, and CentOS 7

## [2.6.1] - 2023-10-13

### Fixed

* JSON parse error on exit, if `if_key_exists`=`fail` and key exists

## [2.6.0] - 2023-10-11

### Others

* back up and restore files when exist (thanks [@bambeusz](https://github.com/bambeusz))
* remove `macos-10.15` and `ubuntu-18.04` virtual environment

## [2.5.1] - 2023-03-25

Expand Down Expand Up @@ -37,10 +56,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* drop `ubuntu-16.04`, and `CentOS 8 (Docker container)`
* [update Node.js version to 16](https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/) (thanks [@duddu](https://github.com/duddu))

## [2.3.1] - 2022-03-04

Created fork niaid/monarch-actions-key-writer

## [2.3.1] - 2021-08-01

### Security
Expand Down Expand Up @@ -191,7 +206,10 @@ Created fork niaid/monarch-actions-key-writer

* First release.

[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.5.1...HEAD
[Unreleased]: https://github.com/shimataro/ssh-key-action/compare/v2.7.0...HEAD
[2.7.0]: https://github.com/shimataro/ssh-key-action/compare/v2.6.1...v2.7.0
[2.6.1]: https://github.com/shimataro/ssh-key-action/compare/v2.6.0...v2.6.1
[2.6.0]: https://github.com/shimataro/ssh-key-action/compare/v2.5.1...v2.6.0
[2.5.1]: https://github.com/shimataro/ssh-key-action/compare/v2.5.0...v2.5.1
[2.5.0]: https://github.com/shimataro/ssh-key-action/compare/v2.4.0...v2.5.0
[2.4.0]: https://github.com/shimataro/ssh-key-action/compare/v2.3.1...v2.4.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Useful for SCP, SFTP, and `rsync` over SSH in deployment script.

tested on:

* [all available virtual machines](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources) (Windows Server 2022/2019, macOS Monterey/Big Sur/Catalina, and Ubuntu 22.04/20.04/18.04)
* [all available virtual machines](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/virtual-environments-for-github-hosted-runners#supported-runners-and-hardware-resources) (Windows Server 2022/2019, macOS Monterey/Big Sur, and Ubuntu 22.04/20.04)
* [Docker container (Ubuntu)](https://hub.docker.com/_/ubuntu) / requires `openssh-client` package; `apt install -y openssh-client`
* [Docker container (CentOS)](https://quay.io/repository/centos/centos) / requires `openssh-clients` package; `yum install -y openssh-clients`
* [Docker container (Alpine Linux)](https://hub.docker.com/_/alpine) / requires `openssh-client` package; `apk add openssh-client`
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ inputs:
required: false
default: "fail"
runs:
using: "node16"
main: "lib/index.js"
post: "lib/index.js"
using: "node20"
main: "./dist/main.js"
post: "./dist/post.js"
Loading
Loading