Skip to content

Commit

Permalink
⬆️ Upgrade server version to 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heavynimbus committed Jun 1, 2024
1 parent 2608967 commit aa8bec8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 30 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

30 changes: 26 additions & 4 deletions .github/workflows/upgrade-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Upgrade Version and Deploy
on:
push:
branches:
- main
- '*'

jobs:
upgrade-version:
Expand Down Expand Up @@ -31,14 +31,30 @@ jobs:
cache: 'maven'
cache-dependency-path: 'server/pom.xml'

- name: put random number in test file
id: next-version
run: |
echo "value=$(./get-next-version.sh)" >> $GITHUB_OUTPUT
- name: Upgrade server version
run: |
./set-next-version.sh --pom server/pom.xml
- name: Commit and push new version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "⬆️ Upgrade server version to ${{ steps.next-version.outputs.value }}"
tagging_message: "v${{ steps.next-version.outputs.value }}"

- name: Build Docker image
env:
NEXT_VERSION: ${{ steps.next-version.outputs.value }}
run: |
docker build -t heavy-mock-http-server:$(./get-next-version.sh) server
docker build -t heavy-mock-http-server:$NEXT_VERSION server
- name: Push Docker image
env:
NEXT_VERSION: ${{ steps.next-version.outputs.value }}
run: |
NEXT_VERSION=$(./get-next-version.sh)
docker tag "heavy-mock-http-server:$NEXT_VERSION" "heavynimbus/heavy-mock-http-server:$NEXT_VERSION"
Expand All @@ -48,7 +64,13 @@ jobs:
run: |
./set-next-version.sh --pom server/pom.xml --snapshot
- name: Commit and push new version
- name: put random number in test file
id: snapshot-version
run: |
echo "value=$(echo $(./get-next-version.sh)-SNAPSHOT)" >> $GITHUB_OUTPUT
- name: Commit and push snapshot version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "⬆️ Upgrade server version to $(./get-next-version.sh)"
commit_message: "⬆️ Upgrade server version to ${{ steps.snapshot-version.outputs.value }}"

2 changes: 1 addition & 1 deletion test.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
15736
27073

0 comments on commit aa8bec8

Please sign in to comment.