Skip to content

Commit b34e828

Browse files
committed
Refactoring GitHub actions
Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
1 parent 3593935 commit b34e828

File tree

5 files changed

+32
-42
lines changed

5 files changed

+32
-42
lines changed

.github/workflows/console-publish.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

.github/workflows/docker-push.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
image-name:
77
required: true
88
type: string
9+
tag-name:
10+
required: true
11+
type: string
912

1013
env:
1114
REGISTRY: ghcr.io
@@ -30,5 +33,5 @@ jobs:
3033
- name: Build and push Docker image
3134
working-directory: src/${{ inputs.image-name }}
3235
run: |
33-
docker build . --tag ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ inputs.image-name }}:latest
34-
docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ inputs.image-name }}:latest
36+
docker build . --tag ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ inputs.image-name }}:${{ inputs.tag-name }}
37+
docker push ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ github.event.repository.name }}/${{ inputs.image-name }}:${{ inputs.tag-name }}

.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+
tags:
6+
- v[0-9].*
7+
8+
jobs:
9+
build-and-push-console:
10+
uses: ./.github/workflows/docker-push.yaml
11+
with:
12+
image-name: console
13+
tag-name: ${{ github.ref_name }}
14+
permissions:
15+
contents: read
16+
packages: write
17+
18+
build-and-push-server:
19+
uses: ./.github/workflows/docker-push.yaml
20+
with:
21+
image-name: server
22+
tag-name: ${{ github.ref_name }}
23+
permissions:
24+
contents: read
25+
packages: write

.github/workflows/server-publish.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

helm-charts/code-editor/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ server:
222222
tokenExpiration: 24
223223
image:
224224
repository: ghcr.io/torchiaf/code-editor/server
225-
tag: latest
225+
tag: v0.1.0
226226
pullPolicy: Always
227227
ports:
228228
- port: 8082
@@ -239,7 +239,7 @@ console:
239239
type: ClusterIP
240240
image:
241241
repository: ghcr.io/torchiaf/code-editor/console
242-
tag: latest
242+
tag: v0.1.0
243243
pullPolicy: Always
244244
env:
245245
baseHref: "/code-editor/console/"

0 commit comments

Comments
 (0)