Skip to content

Commit 0de8e07

Browse files
committed
Github workflow to publish a docker image on a release
1 parent b83083e commit 0de8e07

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Publish Docker image
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-and-push:
9+
runs-on: ubuntu-22.04
10+
permissions:
11+
contents: read
12+
packages: write
13+
14+
steps:
15+
- name: Checkout the repo
16+
uses: actions/checkout@v3
17+
18+
- name: Log in to the Container registry
19+
uses: docker/login-action@v2.1.0
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Extract metadata for Docker
26+
id: meta
27+
uses: docker/metadata-action@v4
28+
with:
29+
images: ghcr.io/threefoldtech/qsfs
30+
tags: |
31+
type=semver,pattern={{version}}
32+
33+
- name: Build and push Docker image
34+
uses: docker/build-push-action@v3
35+
with:
36+
push: true
37+
context: ./docker
38+
tags: ${{ steps.meta.outputs.tags }}
39+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)