Skip to content

Commit 9cb2125

Browse files
authored
Implement release and patch workflows (#574)
Signed-off-by: achour94 <[email protected]>
1 parent 3dc5bcd commit 9cb2125

File tree

3 files changed

+49
-15
lines changed

3 files changed

+49
-15
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
push:
55
branches:
66
- 'main'
7-
tags:
8-
- 'v[0-9]*'
97
pull_request:
108

119
jobs:
@@ -35,10 +33,6 @@ jobs:
3533
fetch-depth: 0
3634
persist-credentials: false
3735

38-
- name: Parse tag
39-
id: vars
40-
run: echo ::set-output name=tag::${GITHUB_REF_NAME#v}
41-
4236
- name: Install and Build
4337
run: |
4438
npm install
@@ -61,15 +55,6 @@ jobs:
6155
username: gridsuiteci
6256
password: ${{ secrets.DOCKERHUB_TOKEN }}
6357

64-
- name: Build and publish Docker image - Tag
65-
if: startsWith(github.ref, 'refs/tags/')
66-
uses: elgohr/Publish-Docker-Github-Action@33a481be3e179353cb7793a92b57cf9a6c985860 # v4
67-
with:
68-
name: gridsuite/gridexplore-app
69-
username: gridsuiteci
70-
password: ${{ secrets.DOCKERHUB_TOKEN }}
71-
tags: ${{ steps.vars.outputs.tag }}
72-
7358
- name: Broadcast update event
7459
if: github.ref == 'refs/heads/main'
7560
uses: gridsuite/broadcast-event@main

.github/workflows/patch.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Patch
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseVersion:
7+
description: Release version (vX.X)
8+
required: true
9+
type: string
10+
11+
jobs:
12+
run-patch:
13+
uses: powsybl/github-ci/.github/workflows/patch-frontend-app-generic.yml@859a4effdaa9c5e79684378f39778fd8d06df3c5
14+
with:
15+
releaseVersion: ${{ github.event.inputs.releaseVersion }}
16+
dockerImage: docker.io/gridsuite/gridexplore-app
17+
dockerUsername: gridsuiteci
18+
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
19+
secrets:
20+
githubappPrivateKey: ${{ secrets.GRIDSUITE_ACTIONS_SECRET }}
21+
docker-token: ${{ secrets.DOCKERHUB_TOKEN }}
22+
sonar-token: ${{ secrets.SONAR_TOKEN }}

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseVersion:
7+
description: Release version (vX.X)
8+
required: true
9+
type: string
10+
gitReference:
11+
description: SHA of the commit from where to release or branch name
12+
required: true
13+
type: string
14+
15+
jobs:
16+
run-release:
17+
uses: powsybl/github-ci/.github/workflows/release-frontend-app-generic.yml@859a4effdaa9c5e79684378f39778fd8d06df3c5
18+
with:
19+
releaseVersion: ${{ github.event.inputs.releaseVersion }}
20+
commitSha: ${{ github.event.inputs.gitReference }}
21+
dockerImage: docker.io/gridsuite/gridexplore-app
22+
dockerUsername: gridsuiteci
23+
githubappId: ${{ vars.GRIDSUITE_ACTIONS_APPID }}
24+
secrets:
25+
githubappPrivateKey: ${{ secrets.GRIDSUITE_ACTIONS_SECRET }}
26+
docker-token: ${{ secrets.DOCKERHUB_TOKEN }}
27+
sonar-token: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)