Skip to content

Commit a9aa87e

Browse files
committed
build: publish latest image when main branch changed
Signed-off-by: Changliang Wu <changliang.wu@smartx.com>
1 parent 73c2ee8 commit a9aa87e

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/publish.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
env:
9+
cache-registry: 'docker-registry-cache.docker-registry.svc:5000'
10+
11+
jobs:
12+
build:
13+
runs-on: [self-hosted, pod]
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Login registry.smtx.io
18+
uses: docker/login-action@v2
19+
with:
20+
registry: registry.smtx.io
21+
username: ${{ secrets.HARBOR_PUSH_USERNAME }}
22+
password: ${{ secrets.HARBOR_PUSH_TOKEN }}
23+
24+
- name: Build and push latest image
25+
run: TAG_SUFFIX=latest docker buildx bake "https://github.com/everoute/actions-runner-controller.git#main"

0 commit comments

Comments
 (0)