forked from le-phare/docker-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (58 loc) · 1.61 KB
/
docker.yml
File metadata and controls
67 lines (58 loc) · 1.61 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Docker
on:
push:
branches:
- "**"
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
caddy:
name: Build & Release
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
packages: write
pull-requests: write
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: |
linux/amd64
linux/arm64
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/proxy
tags: |
type=schedule,pattern=weekly
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }}
- name: Build and push
uses: docker/bake-action@v6
with:
source: "{{defaultContext}}:proxy"
push: true
files: |
./docker-bake.hcl
cwd://${{ steps.meta.outputs.bake-file }}
- uses: googleapis/release-please-action@v4
if: github.ref == 'refs/heads/main'
id: create_release
with:
release-type: simple
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}