Skip to content

ci: automate approval process #3

ci: automate approval process

ci: automate approval process #3

name: 3. Approve Snapshot
on:
push:
branches:
- ci/approve-snapshot
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ldi-orchestrator
jobs:
approve-snapshot:
#if: github.ref == "refs/heads/main"
name: Approve Snapshot and Promote
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 18
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 18
- name: Define docker variables
run: |

Check failure on line 27 in .github/workflows/3.approve-snapshot.yml

View workflow run for this annotation

GitHub Actions / 3. Approve Snapshot

Invalid workflow file

The workflow is not valid. .github/workflows/3.approve-snapshot.yml (Line: 27, Col: 14): Unexpected symbol: 'version//-SNAPSHOT/'. Located at position 5 within expression: env.version//-SNAPSHOT/
export VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
if [[ "${{ env.version }}" == *"SNAPSHOT"* ]]; then
echo "Dealing with a snapshot version. Current version: ${{ env.version }}"
echo "New version: ${{ env.version//-SNAPSHOT/ }}"
else
echo "Already released. Current version: ${{ env.version }}"
fi