mirror of
https://github.com/shimataro/ssh-key-action.git
synced 2025-06-19 22:52:10 +10:00
Merge branch 'develop' into feature/docs-v2
This commit is contained in:
commit
8fd99043ce
4 changed files with 30 additions and 30 deletions
16
README.md
16
README.md
|
@ -19,6 +19,8 @@ Useful for SCP, SFTP, and `rsync` over SSH in deployment script.
|
|||
|
||||
Add your SSH key to your product secrets by clicking `Settings` - `Secrets` - `Add a new secret` beforehand.
|
||||
|
||||
**NOTE:** Due to version of OpenSSH on VM, OPENSSH format (key begins with `-----BEGIN OPENSSH PRIVATE KEY-----`) may not work. Please use PEM format (begins with `-----BEGIN RSA PRIVATE KEY-----`) instead.
|
||||
|
||||
```yaml
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -29,8 +31,6 @@ steps:
|
|||
name: id_rsa # optional
|
||||
known-hosts: ${{ secrets.KNOWN_HOSTS }} # known_hosts; optional
|
||||
config: ${{ secrets.CONFIG }} # ssh_config; optional
|
||||
- name: Install packages
|
||||
run: apt install openssh-client rsync
|
||||
- name: rsync over ssh
|
||||
run: rsync ./foo/ user@remote:bar/
|
||||
```
|
||||
|
@ -70,8 +70,6 @@ steps:
|
|||
User user-of-target
|
||||
IdentityFile ~/.ssh/id_rsa-target
|
||||
ProxyCommand ssh -W %h:%p bastion
|
||||
- name: Install packages
|
||||
run: apt install openssh-client
|
||||
- name: SCP via port-forwarding
|
||||
run: scp ./foo/ target:bar/
|
||||
```
|
||||
|
@ -84,15 +82,15 @@ The scripts and documentation in this project are released under the [MIT Licens
|
|||
|
||||
See [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
[image-build]: https://github.com/shimataro/ssh-key-action/workflows/Build/badge.svg
|
||||
[image-build]: https://github.com/shimataro/ssh-key-action/workflows/Build/badge.svg?event=push&branch=v1
|
||||
[link-build]: https://github.com/shimataro/ssh-key-action
|
||||
[image-verify-windows]: https://github.com/shimataro/ssh-key-action/workflows/Windows/badge.svg
|
||||
[image-verify-macos]: https://github.com/shimataro/ssh-key-action/workflows/macOS/badge.svg
|
||||
[image-verify-ubuntu]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu/badge.svg
|
||||
[image-verify-ubuntu1604]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2016.04/badge.svg
|
||||
[image-verify-windows]: https://github.com/shimataro/ssh-key-action/workflows/Windows/badge.svg?event=push&branch=v1
|
||||
[link-verify-windows]: https://github.com/shimataro/ssh-key-action
|
||||
[image-verify-macos]: https://github.com/shimataro/ssh-key-action/workflows/macOS/badge.svg?event=push&branch=v1
|
||||
[link-verify-macos]: https://github.com/shimataro/ssh-key-action
|
||||
[image-verify-ubuntu]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu/badge.svg?event=push&branch=v1
|
||||
[link-verify-ubuntu]: https://github.com/shimataro/ssh-key-action
|
||||
[image-verify-ubuntu1604]: https://github.com/shimataro/ssh-key-action/workflows/Ubuntu%2016.04/badge.svg?event=push&branch=v1
|
||||
[link-verify-ubuntu1604]: https://github.com/shimataro/ssh-key-action
|
||||
[image-release]: https://img.shields.io/github/release/shimataro/ssh-key-action.svg
|
||||
[link-release]: https://github.com/shimataro/ssh-key-action/releases
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
# - git; I believe it's already installed.
|
||||
# - sed; GNU sed is preferred. POSIX sed may not work.
|
||||
|
||||
set -e
|
||||
|
||||
BASE_BRANCH="develop"
|
||||
|
||||
PACKAGE_NAME="ssh-key-action"
|
||||
|
@ -36,14 +38,14 @@ function main() {
|
|||
check_version_format ${VERSION}
|
||||
check_current_branch
|
||||
|
||||
run create_branch ${BRANCH}
|
||||
run update_changelog ${VERSION}
|
||||
run update_package_version ${VERSION}
|
||||
run update_dependencies_version
|
||||
run regenerate_package_lock
|
||||
run build_package
|
||||
run commit_changes ${VERSION}
|
||||
run finish ${VERSION} ${BRANCH} ${TAG}
|
||||
create_branch ${BRANCH}
|
||||
update_changelog ${VERSION}
|
||||
update_package_version ${VERSION}
|
||||
update_dependencies_version
|
||||
regenerate_package_lock
|
||||
build_package
|
||||
commit_changes ${VERSION}
|
||||
finish ${VERSION} ${BRANCH} ${TAG}
|
||||
}
|
||||
|
||||
function usage() {
|
||||
|
@ -91,10 +93,6 @@ function check_current_branch() {
|
|||
exit 2
|
||||
}
|
||||
|
||||
function run() {
|
||||
"$@" || exit 1
|
||||
}
|
||||
|
||||
function create_branch() {
|
||||
local BRANCH=$1
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf node_modules package-lock.json
|
||||
npm i
|
||||
npm run build
|
||||
|
|
|
@ -1,30 +1,32 @@
|
|||
#!/bin/bash
|
||||
# update dependencies
|
||||
|
||||
set -e
|
||||
|
||||
DATE=$(date +"%Y%m%d")
|
||||
BRANCH=feature/update-dependencies-${DATE}
|
||||
COLOR_SUCCESS="\e[1;32m"
|
||||
COLOR_RESET="\e[m"
|
||||
|
||||
# create branch
|
||||
git checkout develop || exit 1
|
||||
git checkout -b ${BRANCH} || exit 1
|
||||
git checkout develop
|
||||
git checkout -b ${BRANCH}
|
||||
|
||||
# check updates
|
||||
npm ci
|
||||
npm run check-updates -- -u || exit 1
|
||||
npm run check-updates -- -u
|
||||
|
||||
# re-install packages
|
||||
rm -rf package-lock.json node_modules || exit 1
|
||||
npm i || exit 1
|
||||
rm -rf package-lock.json node_modules
|
||||
npm i
|
||||
|
||||
# build check
|
||||
npm run build || exit 1
|
||||
npm run build
|
||||
|
||||
# commit
|
||||
npm ci --only=production || exit 1
|
||||
git add package.json package-lock.json node_modules || exit 1
|
||||
git commit -m "update dependencies" || exit 1
|
||||
npm ci --only=production
|
||||
git add package.json package-lock.json node_modules
|
||||
git commit -m "update dependencies"
|
||||
|
||||
# finished!
|
||||
echo -e "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue