Skip to content

Commit 56e2445

Browse files
authored
feat: add ci workflow
1 parent b82afdf commit 56e2445

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/ci.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Windows custom runner
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
REGISTRY: ghcr.io
9+
10+
jobs:
11+
ci:
12+
runs-on: ubuntu-latest
13+
name: CI
14+
steps:
15+
- name: Checkout current repository
16+
uses: actions/checkout@v3
17+
18+
- name: Docker meta
19+
id: meta
20+
uses: docker/metadata-action@v3
21+
with:
22+
images: |
23+
${{ env.REGISTRY }}/${{ github.repository }}
24+
tags: |
25+
type=ref,event=branch
26+
type=ref,event=pr
27+
type=semver,pattern={{version}}
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v2
31+
32+
- name: Login to Github packages
33+
uses: docker/login-action@v2
34+
with:
35+
registry: ${{ env.REGISTRY }}
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Build and push
40+
uses: docker/build-push-action@v4
41+
with:
42+
context: .
43+
file: Dockerfile
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
47+
cache-from: type=gha
48+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)