Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! publish and cd for docker i…
Browse files Browse the repository at this point in the history
…mage
  • Loading branch information
datYori committed Nov 5, 2024
1 parent 022a14d commit 821678e
Showing 1 changed file with 24 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,31 +25,33 @@ jobs:
- name: build and deploy
run: mvn -B clean deploy --settings settings.xml
publish-docker-image:
runs-on: self-hosted
runs-on: ubuntu-latest
outputs:
should_trigger_deploy: ${{ steps.should_trigger_deploy.outputs.should_trigger_deploy }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.WRITE_PACKAGES }}
logout: false
- name: set version from tag
run: mvn -B versions:set -DnewVersion=${GITHUB_REF#refs/tags/v} -DprocessAllModules
- name: build docker image
run: docker/build
- name: publish docker image
run: docker/publish
- name: set should_trigger_deploy
id: should_trigger_deploy
shell: bash
run: |
pattern='^refs/tags/v[0-9]+\.[0-9]+\.([1-9][0-9]*$|[0-9]+-.*$)'
echo "should_trigger_deploy=$([[ "$GITHUB_REF" =~ $pattern ]] && echo true || echo false)" >> $GITHUB_OUTPUT
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.WRITE_PACKAGES }}
logout: false
- uses: s4u/[email protected]
with:
java-version: 22
maven-version: 3.9.9
- name: set version from tag
run: mvn -B versions:set -DnewVersion=${GITHUB_REF#refs/tags/v} -DprocessAllModules
- name: build docker image
run: docker/build
- name: publish docker image
run: docker/publish
- name: set should_trigger_deploy
id: should_trigger_deploy
shell: bash
run: |
pattern='^refs/tags/v[0-9]+\.[0-9]+\.([1-9][0-9]*$|[0-9]+-.*$)'
echo "should_trigger_deploy=$([[ "$GITHUB_REF" =~ $pattern ]] && echo true || echo false)" >> $GITHUB_OUTPUT
gh-release:
needs: [publish-jars, publish-docker-image]
runs-on: self-hosted
Expand Down

0 comments on commit 821678e

Please sign in to comment.