mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-22 01:00:50 +00:00
CI: add a job that makes sure that the files in /dist/*
are in sync with the source files (such as /index.js
)
This commit is contained in:
parent
9fbc246995
commit
570ea5fc07
2 changed files with 43 additions and 3 deletions
40
.github/workflows/build.yml
vendored
Normal file
40
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: Build
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
tags: '*'
|
||||||
|
concurrency:
|
||||||
|
# Skip intermediate builds: all builds except for builds on the `master` branch
|
||||||
|
# Cancel intermediate builds: only pull request builds
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
|
||||||
|
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 20
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: '16'
|
||||||
|
- run: rm -rf node_modules
|
||||||
|
- run: yarn install --frozen-lockfile
|
||||||
|
- run: npm run build
|
||||||
|
- run: git status
|
||||||
|
- name: "Make sure that the working directory is clean"
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ -z "$(git status --porcelain)" ]]; then
|
||||||
|
echo "The working directory is clean"
|
||||||
|
else
|
||||||
|
echo "The working directory is dirty"
|
||||||
|
exit 1
|
||||||
|
fi
|
6
dist/index.js
vendored
6
dist/index.js
vendored
|
@ -332,9 +332,9 @@ try {
|
||||||
const sshAddCmdInput = core.getInput('ssh-add-cmd');
|
const sshAddCmdInput = core.getInput('ssh-add-cmd');
|
||||||
const gitCmdInput = core.getInput('git-cmd');
|
const gitCmdInput = core.getInput('git-cmd');
|
||||||
|
|
||||||
const sshAgentCmd = sshAgentCmdInput ? sshAgentCmdInput : sshAgentCmdDefault
|
const sshAgentCmd = sshAgentCmdInput ? sshAgentCmdInput : sshAgentCmdDefault;
|
||||||
const sshAddCmd = sshAddCmdInput ? sshAddCmdInput : sshAddCmdDefault
|
const sshAddCmd = sshAddCmdInput ? sshAddCmdInput : sshAddCmdDefault;
|
||||||
const gitCmd = gitCmdInput ? gitCmdInput : gitCmdDefault
|
const gitCmd = gitCmdInput ? gitCmdInput : gitCmdDefault;
|
||||||
|
|
||||||
if (!privateKey) {
|
if (!privateKey) {
|
||||||
core.setFailed("The ssh-private-key argument is empty. Maybe the secret has not been configured, or you are using a wrong secret name in your workflow file.");
|
core.setFailed("The ssh-private-key argument is empty. Maybe the secret has not been configured, or you are using a wrong secret name in your workflow file.");
|
||||||
|
|
Loading…
Reference in a new issue