Update workflow.yml
This commit is contained in:
40
.github/workflows/workflow.yml
vendored
40
.github/workflows/workflow.yml
vendored
@@ -41,24 +41,6 @@ jobs:
|
||||
- name: Run tests
|
||||
run: docker run --workdir=/metrics --entrypoint="" lowlighter/metrics:${{ github.head_ref || 'master' }} npm test
|
||||
|
||||
# Update plugins and template indexes, along with README.md
|
||||
update-indexes:
|
||||
name: Publish rebuilt metrics indexes
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build ]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 15
|
||||
- name: Setup metrics
|
||||
run: npm ci
|
||||
- name: Publish rebuild metrics indexes
|
||||
run: npm run index -- publish
|
||||
|
||||
# Run CodeQL on branch
|
||||
analyze:
|
||||
name: Analyze code
|
||||
@@ -75,6 +57,24 @@ jobs:
|
||||
- name: Analyze code
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
||||
# Update plugins and template indexes, along with README.md
|
||||
update-indexes:
|
||||
name: Publish rebuilt metrics indexes
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, analyze ]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup NodeJS
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 15
|
||||
- name: Setup metrics
|
||||
run: npm ci
|
||||
- name: Publish rebuild metrics indexes
|
||||
run: npm run index -- publish
|
||||
|
||||
# Build docker image from master and publish it to GitHub registry
|
||||
docker-master:
|
||||
name: Publish master to GitHub registry
|
||||
@@ -112,7 +112,7 @@ jobs:
|
||||
docker-release:
|
||||
name: Publish release to GitHub registry
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, analyze, update-indexes, action-master-test ]
|
||||
needs: [ action-master-test ]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[release]')
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -150,7 +150,7 @@ jobs:
|
||||
deploy-master:
|
||||
name: Deploy lowlighter/metrics@master
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build, analyze, update-indexes, action-master-test ]
|
||||
needs: [ action-master-test ]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && contains(github.event.head_commit.message, '[deploy]')
|
||||
steps:
|
||||
- name: Deploy web instance
|
||||
|
||||
Reference in New Issue
Block a user