Skip to content

Commit ffeb20b

Browse files
authored
Merge pull request #2 from useparagon/codex/publish-docker-image-to-public-registry
Add Docker publish workflow
2 parents f14217c + f56cf5d commit ffeb20b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Publish Docker image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
- name: Set up Docker Buildx
20+
uses: docker/setup-buildx-action@v3
21+
- name: Log in to ghcr.io
22+
uses: docker/login-action@v3
23+
with:
24+
registry: ghcr.io
25+
username: ${{ github.repository_owner }}
26+
password: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Build and push image
28+
uses: docker/build-push-action@v5
29+
with:
30+
context: .
31+
push: true
32+
tags: |
33+
ghcr.io/${{ github.repository }}:latest
34+
ghcr.io/${{ github.repository }}:${{ github.sha }}

0 commit comments

Comments
 (0)