Skip to content

Commit d5ca6e4

Browse files
committed
.github/workflows: add tag-based release workflow
1 parent b09fd16 commit d5ca6e4

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -122,32 +122,3 @@ jobs:
122122
done
123123
make test-e2e
124124
125-
publish:
126-
name: Publish container image to Quay
127-
runs-on: ubuntu-24.04
128-
timeout-minutes: 20
129-
if: ${{ github.event.repository.fork == false && github.event_name == 'push' }}
130-
needs:
131-
- check-license
132-
- generate
133-
- build
134-
- unit-tests
135-
- e2e-tests
136-
steps:
137-
- name: Checkout repository
138-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
139-
140-
- name: Setup Golang Environment
141-
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
142-
with:
143-
go-version: ${{ env.go-version }}
144-
145-
- name: Login to Quay.io
146-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
147-
with:
148-
registry: quay.io
149-
username: ${{ secrets.QUAY_USERNAME }}
150-
password: ${{ secrets.QUAY_PASSWORD }}
151-
152-
- name: Build images and push
153-
run: ./scripts/publish.sh

.github/workflows/release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
env:
7+
QUAY_PATH: quay.io/brancz/kube-rbac-proxy
8+
go-version: '1.25'
9+
jobs:
10+
publish:
11+
name: Publish container image to Quay
12+
runs-on: ubuntu-24.04
13+
timeout-minutes: 20
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
17+
- name: Setup golang for building
18+
uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
19+
with:
20+
go-version: ${{ env.go-version }}
21+
- name: Login to Quay.io
22+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
23+
with:
24+
registry: quay.io
25+
username: ${{ secrets.QUAY_USERNAME }}
26+
password: ${{ secrets.QUAY_PASSWORD }}
27+
- name: Build images and push
28+
run: ./scripts/publish.sh
29+

0 commit comments

Comments
 (0)