-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 2.17 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI
on: [push]
jobs:
license-headers:
name: Check licenses headers
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- name: Checkout sources
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Check License Header (Check Mode)
uses: apache/skywalking-eyes/[email protected]
with:
config: .github/config/.licenserc.yaml
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false
- name: Parse tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF_NAME#v}
- name: Install and Build
run: |
npm install
npm run licenses-check
npm run-script test
npm run-script build
- name: Build and publish Docker image - Main
if: github.ref == 'refs/heads/main'
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
with:
name: gridsuite/gridXXX-app
username: gridsuiteci
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and publish Docker image - Tag
if: startsWith(github.ref, 'refs/tags/')
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
with:
name: gridsuite/gridstudy-app
username: gridsuiteci
password: ${{ secrets.DOCKERHUB_TOKEN }}
tags: ${{ steps.vars.outputs.tag }}
- name: Broadcast update event
if: github.ref == 'refs/heads/main'
uses: gridsuite/broadcast-event@main
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: gridXXX_app_updated