reuse release version to pass full and minor versions to docker deployment step.
@@ -21,6 +21,7 @@ jobs:
with:
java-version: 11
- name: Release
+ id: release
run: |
git config user.name "quorumbot"
now=`date +%Y%m%d%H%M%S`
@@ -40,27 +41,22 @@ jobs:
git add version.txt
git commit -m "Change version to next development version"
git push --set-upstream origin release-$now
+
+ minor_version=${tagversion%.*}
+ echo ::set-output name=full-ver::$tagversion
+ echo ::set-output name=minor-ver::$minor_version
- name: Save tessera-app.jar
uses: actions/upload-artifact@v2
with:
name: tessera-app
path: tessera-dist/tessera-app/build/libs/tessera-app-*-app.jar
- - name: Determine tag name
- id: tag
- run: |
- DIST=$(ls tessera-dist/tessera-app/build/libs/tessera-app-*-app.jar)
- FULL_VER=$(echo $DIST | sed -e 's/^.*tessera-app-\(.*\)-app.jar$/\1/g')
- MINOR_VER=$(echo $DIST | sed -e 's/^.*tessera-app-\([[:digit:]]*\.[[:digit:]]*\).*-app.jar$/\1/g')
- echo $DIST $FULL_VER $MINOR_VER
- echo ::set-output name=full-ver::$FULL_VER
- echo ::set-output name=minor-ver::$MINOR_VER
- name: Push Docker image
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
repository: ${{ secrets.DOCKER_REPO }}
- tags: ${{ steps.tag.outputs.full-ver }}, ${{ steps.tag.outputs.minor-ver }}, latest
+ tags: ${{ steps.release.outputs.full-ver }}, ${{ steps.release.outputs.minor-ver }}, latest
add_git_labels: true
dockerfile: .github/workflows/noBuild.Dockerfile
path: tessera-dist/tessera-app/build/libs
