-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (38 loc) · 1.11 KB
/
cr.yml
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: Container Registry
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: docker/login-action@v3
id: login
name: Setup login
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v5
id: metadata
name: Setup metadata
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=ref,event=branch
- uses: docker/setup-buildx-action@v3
id: setup-buildx
name: Setup build
- uses: docker/build-push-action@v5
id: build-push
name: Build and push
with:
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache