Skip to content

Commit 2ca810d

Browse files
committed
Add main build
1 parent 238123d commit 2ca810d

2 files changed

Lines changed: 28 additions & 25 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: build
33
on:
44
push:
55
branches-ignore:
6-
- deploy
6+
- main
77
tags-ignore:
88
- v*
99

@@ -55,30 +55,6 @@ jobs:
5555
files: ./build/coverage.xml
5656

5757
examples:
58-
if: github.ref != 'refs/heads/main'
5958
uses: ./.github/workflows/examples.yml
6059
with:
6160
upload: false
62-
63-
image:
64-
if: github.ref == 'refs/heads/main'
65-
uses: ./.github/workflows/docker-multiarch.yml
66-
needs: build
67-
with:
68-
image-name: quantflow
69-
70-
deploy:
71-
name: Create Deployment
72-
if: github.ref == 'refs/heads/main'
73-
runs-on: ubuntu-latest
74-
permissions:
75-
deployments: write
76-
needs: image
77-
steps:
78-
- uses: chrnorm/deployment-action@v2
79-
name: Create GitHub deployment
80-
id: deployment
81-
with:
82-
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
83-
environment: prod
84-
payload: '{"tag": "main-${{ github.sha }}"}'

.github/workflows/main.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
image:
10+
uses: ./.github/workflows/docker-multiarch.yml
11+
with:
12+
image-name: quantflow
13+
14+
deploy:
15+
name: Create Deployment
16+
runs-on: ubuntu-latest
17+
permissions:
18+
deployments: write
19+
needs: image
20+
steps:
21+
- uses: chrnorm/deployment-action@v2
22+
name: Create GitHub deployment
23+
id: deployment
24+
with:
25+
token: "${{ secrets.TOKEN_DEPLOYMENT }}"
26+
environment: prod
27+
payload: '{"tag": "main-${{ github.sha }}"}'

0 commit comments

Comments
 (0)