Skip to content

Commit d9d3d0b

Browse files
committed
add pub script
1 parent 0c613fb commit d9d3d0b

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.github/workflows/docker-pub.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker Pub
2+
3+
on: workflow_dispatch
4+
5+
jobs:
6+
name: Buid and push Docker image to GitHub Container registry
7+
runs-on: ubuntu-latest
8+
permissions:
9+
packages: write
10+
contents: read
11+
steps:
12+
- name: Checkout the repository
13+
uses: actions/checkout@v2
14+
15+
- name: Build Meta
16+
run: echo "::set-output name=dtag::ghcr.io/barelyhuman/goblin:nightly"
17+
id: meta
18+
19+
- name: Login to GitHub Container registry
20+
uses: docker/login-action@v1
21+
env:
22+
GITHUB_USER: ${{ github.actor }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
registry: ghcr.io
26+
username: $GITHUB_USER
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build and Push Docker Image
30+
env:
31+
REGISTRY: ghcr.io
32+
OWNER: barelyhuman
33+
IMAGE_NAME: ${{ github.repository }}
34+
uses: docker/build-push-action@v2
35+
with:
36+
context: .
37+
file: Dockerfile
38+
push: true
39+
tags: ${{ steps.meta.outputs.dtag }}

0 commit comments

Comments
 (0)