Skip to content

Commit fdc05c1

Browse files
committed
ci: add publish workflow
1 parent b035ae0 commit fdc05c1

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v4
2929
- name: Build
3030
id: build
31-
uses: docker/build-push-action@v5
31+
uses: docker/build-p1ush-action@v5
3232
with:
3333
context: .
3434
cache-from: type=gha

.github/workflows/publish.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
10+
jobs:
11+
ghcr:
12+
runs-on: ubuntu-22.04
13+
permissions:
14+
contents: read
15+
packages: write
16+
if: github.repository_owner == 'Virtool'
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Write VERSION file
21+
run: echo ${{ github.event.release.tag_name }} > VERSION
22+
- name: Login to Registry
23+
uses: docker/login-action@v3
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ secrets.GH_USERNAME }}
27+
password: ${{ secrets.GH_TOKEN }}
28+
- name: Extract Metadata
29+
id: meta
30+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
31+
with:
32+
images: ${{ env.REGISTRY }}/virtool/iimi
33+
- name: Build and Push
34+
uses: docker/build-push-action@v5
35+
with:
36+
context: .
37+
labels: ${{ steps.meta.outputs.labels }}
38+
push: true
39+
tags: ${{ steps.meta.outputs.tags }}
40+
target: "base"

0 commit comments

Comments
 (0)