-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (104 loc) · 3.1 KB
/
deploy.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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Deploy
on:
release:
types:
- published
jobs:
build_chewedfeed:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 1
- name: Extract tag
id: extract_tag
run: echo "{tag}=${GITHUB_REF/refs\\/tags\\//}" >> $GITHUB_OUTPUT
- name: Meta
id: meta
uses: docker/metadata-action@v5
with:
images: containers.chewed-k8s.net/flags-gg/docs
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{raw}}
type=sha
- name: QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-
- name: Login Github
uses: docker/login-action@v3
with:
registry: containers.chewed-k8s.net
username: robot$flags-gg+github
password: ${{ secrets.CONTAINERS_KEY }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64
builder: ${{ steps.buildx.outputs.name }}
file: ./k8s/Containerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true
build_gitlab:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 1
- name: Extract tag
id: extract_tag
run: echo "{tag}=${GITHUB_REF/refs\\/tags\\//}" >> $GITHUB_OUTPUT
- name: Meta
id: meta
uses: docker/metadata-action@v5
with:
images: registry.gitlab.com/flags-gg/docs
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{raw}}
type=sha
- name: QEMU
id: qemu
uses: docker/setup-qemu-action@v3
- name: Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Cache
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-
- name: Login Github
uses: docker/login-action@v3
with:
registry: registry.gitlab.com
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_POT }}
- name: Build and Push
id: docker_build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64, linux/arm64
builder: ${{ steps.buildx.outputs.name }}
file: ./k8s/Containerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
push: true