-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from EricThuaud/main
add github workflows
- Loading branch information
Showing
2 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Public-Enemy UI build | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 14C | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn | ||
- run: yarn build | ||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Public-Enemy UI Release and Docker image publication | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
install: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use Node.js 14C | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn --frozen-lockfile | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js 14 | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- run: yarn | ||
- run: yarn build | ||
- name: Upload build | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout current branch | ||
uses: actions/checkout@v2 | ||
- name: Get current version | ||
id: version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- run: echo ${{steps.version.outputs.prop}} | ||
- name: Release snapshot | ||
id: release-snapshot | ||
uses: actions/create-release@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{steps.version.outputs.prop}} | ||
release_name: ${{steps.version.outputs.prop}} | ||
draft: false | ||
prerelease: false | ||
docker: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download build | ||
id: download | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: build | ||
- name: Get current version | ||
id: version | ||
uses: notiz-dev/github-action-json-property@release | ||
with: | ||
path: 'package.json' | ||
prop_path: 'version' | ||
- run: echo ${{steps.version.outputs.prop}} | ||
- name: Publish to Registry | ||
uses: elgohr/Publish-Docker-Github-Action@master | ||
with: | ||
name: inseefr/public-enemy | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
tags: ${{steps.version.outputs.prop}} | ||
|