mirror of
https://github.com/opelly27/streetmerchant.git
synced 2026-05-20 07:37:39 +00:00
ci: update names and steps (#1720)
This commit is contained in:
@@ -1,23 +1,25 @@
|
|||||||
name: ci
|
name: Continuous Integration
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
build-lint:
|
build-lint:
|
||||||
|
name: Build and lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository
|
||||||
- uses: actions/setup-node@v2.1.4
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v2.1.4
|
||||||
with:
|
with:
|
||||||
node-version: 14.15.4
|
node-version: 14.15.4
|
||||||
- uses: actions/cache@v2
|
- name: Setup build cache
|
||||||
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ~/.npm
|
path: ~/.npm
|
||||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
restore-keys: ${{ runner.os }}-node-
|
restore-keys: ${{ runner.os }}-node-
|
||||||
- name: Add problem matcher
|
|
||||||
run: echo "::add-matcher::.github/xo-problem-matcher.json"
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
- name: Compile TypeScript
|
- name: Compile TypeScript
|
||||||
@@ -25,16 +27,19 @@ jobs:
|
|||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
build-docker:
|
build-docker:
|
||||||
|
name: Build Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository
|
||||||
- uses: dorny/paths-filter@v2.7.0
|
uses: actions/checkout@v2
|
||||||
|
- name: Run paths filter
|
||||||
|
uses: dorny/paths-filter@v2.7.0
|
||||||
id: filter
|
id: filter
|
||||||
with:
|
with:
|
||||||
filters: |
|
filters: |
|
||||||
build:
|
build:
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
- 'package*.json'
|
- 'package*.json'
|
||||||
- name: Build image
|
- name: Build Docker image
|
||||||
if: steps.filter.outputs.build == 'true'
|
if: steps.filter.outputs.build == 'true'
|
||||||
run: docker build .
|
run: docker build .
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
name: documentation
|
name: Documentation
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build-deploy:
|
||||||
|
name: Build and publish documentation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Setup Python runtime
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v2
|
uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
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
|
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
|
run: mkdocs gh-deploy --force
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
name: nightly
|
name: Nightly Release
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
build-publish:
|
||||||
|
name: Build and publish nightly Docker image
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository
|
||||||
- name: login into github package registry
|
uses: actions/checkout@v2
|
||||||
|
- name: Login into GitHub Container Registry
|
||||||
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
|
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
|
||||||
- name: build nightly docker image
|
- name: Build Docker image
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
-t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \
|
-t "ghcr.io/${GITHUB_REPOSITORY}:${GITHUB_SHA:0:7}" \
|
||||||
-t "ghcr.io/${GITHUB_REPOSITORY}:nightly" .
|
-t "ghcr.io/${GITHUB_REPOSITORY}:nightly" .
|
||||||
- name: publish nightly image
|
- name: Publish Docker image
|
||||||
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
|
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: pr-lint
|
name: Pull Request Lint
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
types:
|
types:
|
||||||
@@ -7,9 +7,11 @@ on:
|
|||||||
- reopened
|
- reopened
|
||||||
- synchronize
|
- synchronize
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
pull-request-lint:
|
||||||
|
name: Lint pull request
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: amannn/action-semantic-pull-request@v3.1.0
|
- name: Lint pull request
|
||||||
|
uses: amannn/action-semantic-pull-request@v3.1.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: cd
|
name: Release
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -7,17 +7,20 @@ jobs:
|
|||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout repository
|
||||||
- uses: google-github-actions/release-please-action@v2.15
|
uses: actions/checkout@v2
|
||||||
|
- name: Setup release please
|
||||||
|
uses: google-github-actions/release-please-action@v2.15
|
||||||
id: release
|
id: release
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
release-type: simple
|
release-type: simple
|
||||||
changelog-path: docs/changelog.md
|
changelog-path: docs/changelog.md
|
||||||
package-name: streetmerchant
|
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
|
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 }}
|
if: ${{ steps.release.outputs.release_created }}
|
||||||
run: |
|
run: |
|
||||||
docker build \
|
docker build \
|
||||||
@@ -25,6 +28,6 @@ jobs:
|
|||||||
-t "ghcr.io/${GITHUB_REPOSITORY}:latest" .
|
-t "ghcr.io/${GITHUB_REPOSITORY}:latest" .
|
||||||
env:
|
env:
|
||||||
TAG_NAME: ${{ steps.release.outputs.tag_name }}
|
TAG_NAME: ${{ steps.release.outputs.tag_name }}
|
||||||
- name: publish latest image
|
- name: Publish Docker image
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
if: ${{ steps.release.outputs.release_created }}
|
||||||
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
|
run: docker push "ghcr.io/${GITHUB_REPOSITORY}"
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: 'Close stale issues'
|
name: Stale Checker
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: '0 0 * * *'
|
||||||
@@ -21,6 +21,6 @@ jobs:
|
|||||||
stale-pr-message: ${{ env.STALE_MESSAGE }}
|
stale-pr-message: ${{ env.STALE_MESSAGE }}
|
||||||
env:
|
env:
|
||||||
CLOSE_MESSAGE: 'This issue has been closed because it is stale. Reopen if necessary.'
|
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_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'
|
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user