Added new Actions and modified two Actions

master
Marcus Bakker 2020-07-16 21:56:35 +02:00
parent 9c8b20f84c
commit 54a0cf8cde
4 changed files with 51 additions and 15 deletions

View File

@ -0,0 +1,21 @@
name: Build Docker image - on release
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: rabobankcdc/dettect
tags: latest
tag_with_ref: true

View File

@ -0,0 +1,22 @@
name: Build Docker image - manual
on:
workflow_dispatch:
inputs:
version_tag:
description: 'Format: v[version number]'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- name: Checkout code
uses: actions/checkout@v2
- name: Build and push Docker images
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: rabobankcdc/dettect
tags: latest, ${{ github.event.inputs.version_tag }}

View File

@ -1,6 +1,4 @@
name: Build the Editor
# Controls when the action will run. Triggers the workflow on push or pull request events
on:
push:
branches: [ master ]
@ -11,31 +9,30 @@ on:
- 'editor/package.json'
- 'editor/vue.config.js'
jobs:
# This workflow contains a single job called "build":
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@master
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
# set up NodeJS
- uses: actions/setup-node@master
- name: Instal project dependencies
run: npm install
working-directory: ./editor
- name: Build the project
run: npm run build
working-directory: ./editor
- name: Peform post build actions
run: rm -r node_modules
working-directory: ./editor
- name: Commit files
run: |
git config --local user.email "action@github.com"

View File

@ -1,19 +1,15 @@
name: Update the DeTT&CT Editor on GitHub Pages
# Controls when the action will run. Triggers the workflow on push or pull request events
on:
push:
branches: [ master ]
paths: 'editor/dist/dettect-editor/**'
jobs:
# This workflow contains a single job called "copy"
copy:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
- uses: actions/checkout@v2
- name: Update DeTT&CT Editor
uses: peaceiris/actions-gh-pages@v3
with: