ci: update names and steps (#1720)

This commit is contained in:
Jef LeCompte
2021-01-17 15:59:32 -05:00
committed by GitHub
parent 7997d6d22a
commit 8ece4b6412
6 changed files with 44 additions and 31 deletions
+14 -9
View File
@@ -1,23 +1,25 @@
name: ci
name: Continuous Integration
on:
pull_request:
branches:
- main
jobs:
build-lint:
name: Build and lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.4
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2.1.4
with:
node-version: 14.15.4
- uses: actions/cache@v2
- name: Setup build cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Add problem matcher
run: echo "::add-matcher::.github/xo-problem-matcher.json"
- name: Install dependencies
run: npm ci
- name: Compile TypeScript
@@ -25,16 +27,19 @@ jobs:
- name: Run linter
run: npm run lint
build-docker:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2.7.0
- name: Checkout repository
uses: actions/checkout@v2
- name: Run paths filter
uses: dorny/paths-filter@v2.7.0
id: filter
with:
filters: |
build:
- 'Dockerfile'
- 'package*.json'
- name: Build image
- name: Build Docker image
if: steps.filter.outputs.build == 'true'
run: docker build .
+6 -5
View File
@@ -1,19 +1,20 @@
name: documentation
name: Documentation
on:
push:
branches:
- main
jobs:
deploy:
build-deploy:
name: Build and publish documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Python runtime
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Python dependencies
- name: Install Python packages
run: pip install mkdocs-material mkdocs-git-revision-date-plugin mkdocs-macros-plugin
- name: Deploy documentation
- name: Build and publish documentation
run: mkdocs gh-deploy --force
@@ -1,19 +1,21 @@
name: nightly
name: Nightly Release
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch: {}
jobs:
publish:
build-publish:
name: Build and publish nightly Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: login into github package registry
- name: Checkout repository
uses: actions/checkout@v2
- name: Login into GitHub Container Registry
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: build nightly docker image
- name: Build Docker image
run: |
docker build \
-t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \
-t "ghcr.io/${GITHUB_REPOSITORY}:nightly" .
- name: publish nightly image
- name: Publish Docker image
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
@@ -1,4 +1,4 @@
name: pr-lint
name: Pull Request Lint
on:
pull_request_target:
types:
@@ -7,9 +7,11 @@ on:
- reopened
- synchronize
jobs:
main:
pull-request-lint:
name: Lint pull request
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3.1.0
- name: Lint pull request
uses: amannn/action-semantic-pull-request@v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
name: cd
name: Release
on:
push:
branches:
@@ -7,17 +7,20 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: google-github-actions/release-please-action@v2.15
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup release please
uses: google-github-actions/release-please-action@v2.15
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
changelog-path: docs/changelog.md
package-name: streetmerchant
- name: login into github package registry
- name: Login into GitHub Container Registry
if: ${{ steps.release.outputs.release_created }}
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
- name: build latest docker image
- name: Build Docker image
if: ${{ steps.release.outputs.release_created }}
run: |
docker build \
@@ -25,6 +28,6 @@ jobs:
-t "ghcr.io/${GITHUB_REPOSITORY}:latest" .
env:
TAG_NAME: ${{ steps.release.outputs.tag_name }}
- name: publish latest image
- name: Publish Docker image
if: ${{ steps.release.outputs.release_created }}
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
+2 -2
View File
@@ -1,4 +1,4 @@
name: 'Close stale issues'
name: Stale Checker
on:
schedule:
- cron: '0 0 * * *'
@@ -21,6 +21,6 @@ jobs:
stale-pr-message: ${{ env.STALE_MESSAGE }}
env:
CLOSE_MESSAGE: 'This issue has been closed because it is stale. Reopen if necessary.'
EXEMPT_LABEL: 'status: needs discussion'
EXEMPT_LABEL: 'status: needs discussion,priority: low,priority: medium, priority: high,status: help wanted,status: in progress'
STALE_LABEL: 'status: stale'
STALE_MESSAGE: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'