Skip to content

Commit 91cfac8

Browse files
committed
add publish workflow
1 parent dfc586a commit 91cfac8

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

.github/workflows/publish.yaml

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- 'v*.*.*'
9+
10+
jobs:
11+
publish-docker:
12+
name: Build and push custom image
13+
runs-on: ubuntu-20.04
14+
permissions:
15+
contents: 'read'
16+
id-token: 'write'
17+
packages: 'write'
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
- name: Docker meta
22+
id: meta
23+
uses: docker/metadata-action@v5
24+
with:
25+
images: |
26+
ghcr.io/pluralsh/edge
27+
docker.io/pluralsh/edge
28+
tags: |
29+
type=semver,pattern={{version}}
30+
- name: Set up QEMU
31+
uses: docker/setup-qemu-action@v3
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
- name: Login to GHCR
35+
uses: docker/login-action@v3
36+
with:
37+
registry: ghcr.io
38+
username: ${{ github.repository_owner }}
39+
password: ${{ secrets.GITHUB_TOKEN }}
40+
- name: Login to Docker
41+
uses: docker/login-action@v3
42+
with:
43+
username: mjgpluralsh
44+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
45+
- name: Build and push
46+
uses: docker/build-push-action@v5
47+
with:
48+
context: "."
49+
file: "./Dockerfile"
50+
push: true
51+
tags: ${{ steps.meta.outputs.tags }}
52+
labels: ${{ steps.meta.outputs.labels }}
53+
platforms: linux/arm64
54+
cache-from: type=gha
55+
cache-to: type=gha,mode=max
56+
build-args: |
57+
GIT_COMMIT=${{ github.sha }}

0 commit comments

Comments
 (0)