-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.29 KB
/
dockerify.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
name: CI/CD
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '.gitignore'
- '.mergify.yml'
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
- 'renovate.json'
pull_request:
workflow_dispatch:
env:
PROJECT_NAME: kt-jupyter
jobs:
dockerify:
runs-on: ubuntu-latest
name: Build image and release
steps:
- name: Checkout the repo
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Compute next release version
id: compute-next-version
uses: nicolasfara/[email protected]
with:
github-token: ${{ github.token }}
- name: Create Docker Image
run: |
docker build -t pikalab/${{ env.PROJECT_NAME }}:latest .
shell: bash
- name: Docker Login
if: ${{ steps.compute-next-version.outputs.will-release }}
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Release Image on Docker Hub
if: ${{ steps.compute-next-version.outputs.will-release }}
run: |
npm install
npx semantic-release
env:
ENFORCE_VERSION: ${{ steps.compute-next-version.outputs.next-version }}