Skip to content

Commit

Permalink
ci: automate approval process
Browse files Browse the repository at this point in the history
  • Loading branch information
Yalz committed Sep 18, 2023
1 parent bb8d359 commit 8bfd2d8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/3.approve-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
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: Determine version
run: |
export VERSION=$(mvn help:evaluate -Dexpression="project.version" -q -DforceStdout)
echo "version=$VERSION" >> $GITHUB_ENV
- name: Define docker variables
run: |
if [[ "${{ env.version }}" != *"SNAPSHOT"* ]]; then
echo "Dealing with a snapshot version"
echo "${{ env.version }}"
fi
else
echo "Already released"
fi

0 comments on commit 8bfd2d8

Please sign in to comment.