Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit a41d9d4

Browse files
feat: setup GitHub Actions
0 parents  commit a41d9d4

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/build.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Deploy
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Docker meta
12+
id: meta
13+
uses: docker/metadata-action@v4
14+
with:
15+
images: |
16+
ghcr.io/mokmok-dev/playwright-go
17+
tags: |
18+
type=ref,event=branch
19+
type=ref,event=pr
20+
type=semver,pattern={{version}}
21+
type=semver,pattern={{major}}.{{minor}}
22+
- name: Login GitHub Packages
23+
if: github.event_name != 'pull_request'
24+
uses: docker/login-action@v1.13.0
25+
with:
26+
registry: ghcr.io
27+
username: ${{ github.actor }}
28+
password: ${{ secrets.GITHUB_TOKEN }}
29+
- name: Build and Push
30+
uses: docker/build-push-action@v4.0.0
31+
with:
32+
context: .
33+
push: ${{ github.event_name != 'pull_request' }}
34+
tags: ${{ steps.meta.outputs.tags }}
35+
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)