mirror of
https://github.com/crazy-max/ghaction-import-gpg.git
synced 2024-11-22 13:00:56 -05:00
Add CI, master and test workflows
This commit is contained in:
parent
85d8434f06
commit
2fde0b12b9
3 changed files with 94 additions and 0 deletions
27
.github/workflows/ci.yml
vendored
Normal file
27
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
-
|
||||||
|
name: Import GPG key
|
||||||
|
uses: ./
|
||||||
|
env:
|
||||||
|
SIGNING_KEY: ${{ secrets.SIGNING_KEY_TEST }}
|
40
.github/workflows/master.yml
vendored
Normal file
40
.github/workflows/master.yml
vendored
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
name: master
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
prune:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
# https://github.com/actions/checkout
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
# https://github.com/actions/checkout/issues/6
|
||||||
|
name: Fix detached HEAD
|
||||||
|
run: git checkout ${GITHUB_REF#refs/heads/}
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
run: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
-
|
||||||
|
name: Set up Git
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
git config user.name "${GITHUB_ACTOR}"
|
||||||
|
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
||||||
|
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
|
||||||
|
-
|
||||||
|
name: Commit and push changes
|
||||||
|
run: |
|
||||||
|
git add .
|
||||||
|
if output=$(git status --porcelain) && [ ! -z "$output" ]; then
|
||||||
|
git commit -m 'Update generated content'
|
||||||
|
git push
|
||||||
|
fi
|
27
.github/workflows/test.yml
vendored
Normal file
27
.github/workflows/test.yml
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
name: test
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
# https://github.com/actions/checkout
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
-
|
||||||
|
name: Install
|
||||||
|
run: npm ci
|
||||||
|
-
|
||||||
|
name: Build
|
||||||
|
run: npm run build
|
||||||
|
-
|
||||||
|
name: Test
|
||||||
|
run: npm run test
|
Loading…
Reference in a new issue