Skip to content

Commit 9cc0d26

Browse files
committed
feat: add build on push action
1 parent 2b5ba25 commit 9cc0d26

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/on-push.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test build on push
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- master
7+
pull_request:
8+
branches:
9+
- "**"
10+
11+
jobs:
12+
build-and-push:
13+
runs-on: self-hosted
14+
15+
steps:
16+
- name: Set up Docker Buildx
17+
uses: docker/setup-buildx-action@v3
18+
19+
- name: Extract tag version
20+
id: extract_tag
21+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
22+
23+
### FRONTEND IMAGE ###
24+
- name: Build Frontend Image
25+
uses: docker/build-push-action@v5
26+
with:
27+
context: .
28+
file: ./Dockerfile
29+
build-args: |
30+
VERSION=dev
31+
tags: |
32+
timlohrer/auth-rs-frontend:dev
33+
34+
### BACKEND IMAGE ###
35+
- name: Build Backend Image
36+
uses: docker/build-push-action@v5
37+
with:
38+
context: ./backend
39+
file: ./backend/Dockerfile
40+
build-args: |
41+
VERSION=${{ steps.extract_tag.outputs.VERSION }}
42+
tags: |
43+
timlohrer/auth-rs-backend:dev

0 commit comments

Comments
 (0)