Skip to content

Commit

Permalink
restore application.yaml after release is done
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosthe19916 committed Oct 28, 2024
1 parent a3d2e45 commit 69c5ced
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
description: "The Trustify container image"
default: "ghcr.io/trustification/trustd:latest"
required: true
image-db:
description: "The Database container image"
default: "quay.io/sclorg/postgresql-15-c9s:latest"
required: true

jobs:
prepare:
Expand All @@ -34,8 +38,10 @@ jobs:
# Prepare application.yaml
yq e -P -i '.related.image.server=strenv(IMAGE_SERVER)' src/main/resources/application.yaml
yq e -P -i '.related.image.db=strenv(IMAGE_DB)' src/main/resources/application.yaml
env:
IMAGE_SERVER: ghcr.io/trustification/trustd:${{ github.event.inputs.image-server }}
IMAGE_SERVER: ${{ github.event.inputs.image-server }}
IMAGE_DB: ${{ github.event.inputs.image-db }}
- name: Set release version ${{ github.event.inputs.version }}
run: |
mvn -B versions:set versions:commit -DnewVersion=$NEW_VERSION
Expand Down Expand Up @@ -76,6 +82,15 @@ jobs:
with:
name: jreleaser-log
path: 'jreleaser-log.tgz'
- name: Restore application.yaml
run: |
# Install yq
RUN curl --output /usr/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x /usr/bin/yq
# Prepare application.yaml
yq e -P -i '.related.image.server="${RELATED_IMAGE_SERVER:ghcr.io/trustification/trustd:latest}"' src/main/resources/application.yaml
yq e -P -i '.related.image.db="${RELATED_IMAGE_DB:quay.io/sclorg/postgresql-15-c9s:latest}"' src/main/resources/application.yaml
- name: Set version ${{ github.event.inputs.next }}
run: |
mvn -B versions:set versions:commit -DnewVersion=$NEW_VERSION
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ related:
server: ${RELATED_IMAGE_SERVER:ghcr.io/trustification/trustd:latest}
db: ${RELATED_IMAGE_DB:quay.io/sclorg/postgresql-15-c9s:latest}
pull-policy: Always

# Quarkus config
quarkus:
container-image:
Expand Down

0 comments on commit 69c5ced

Please sign in to comment.