-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (41 loc) · 1.01 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: ghcr
on:
push:
branches:
- '*'
pull_request:
branches:
- main
jobs:
release:
name: ghcrbuild
if: ${{ github.event_name != 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: set up buildx
uses: docker/setup-buildx-action@v1
- name: construct image metadata
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=sha
type=ref,event=branch
type=semver,pattern={{version}}
type=sha
- name: login to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}