Skip to content

Commit ab7c141

Browse files
Merge pull request #9 from weekenthralling/dev
chore: github workflow
2 parents 688c75c + ee030e5 commit ab7c141

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
env:
12+
DOCKER_USERNAME: weekenthralling
13+
IMAGE_NAME: weekenthralling/jupyter-kernel-controller
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v1
21+
22+
- name: Cache Docker layers
23+
uses: actions/cache@v2
24+
with:
25+
path: /tmp/.buildx-cache
26+
key: ${{ runner.os }}-buildx-${{ github.sha }}
27+
restore-keys: |
28+
${{ runner.os }}-buildx-
29+
30+
- name: Login to Docker Hub
31+
uses: docker/login-action@v2
32+
with:
33+
username: ${{ env.DOCKER_USERNAME }}
34+
password: ${{ secrets.DOCKER_TOKEN }}
35+
36+
- name: Build and push Docker image
37+
uses: docker/build-push-action@v2
38+
with:
39+
context: .
40+
push: true
41+
tags: ${{ env.IMAGE_NAME }}:${{ github.event.release.tag_name }}

0 commit comments

Comments
 (0)