Skip to content

Commit

Permalink
ci(release): wip
Browse files Browse the repository at this point in the history
Signed-off-by: Dominik Pinsel <dominik.pinsel@mercedes-benz.com>
  • Loading branch information
DominikPinsel committed Sep 14, 2023
1 parent 51b1d0c commit 7bfbb1b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,26 +133,26 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Extract new image release version from Chart.yaml
if: github.ref == 'refs/heads/main'

- name: Extract new app version from Chart.yaml
run: |
chart_yaml_path="./charts/managed-identity-wallet/Chart.yaml"
# Use grep to find the line containing appVersion, awk to split by ":" and cut to remove leading/trailing spaces
app_version=$(grep 'appVersion:' "$chart_yaml_path" | awk -F: '{gsub(/^[ \t]+|[ \t]+$/,"", $2); print $2}')
echo "IMAGE_VERSION=$app_version" >> $GITHUB_ENV
echo "RELEASE_VERSION=$app_version" >> $GITHUB_ENV
- name: Extract new image release version from Chart.yaml
if: github.ref == 'refs/heads/main'
run: |
echo "IMAGE_VERSION={{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
echo "LATEST_IMAGE_TAG=latest" >> $GITHUB_ENV
- name: Extract new image pre-release version from Chart.yaml
if: github.ref != 'refs/heads/main'
run: |
chart_yaml_path="./charts/managed-identity-wallet/Chart.yaml"
# Use grep to find the line containing appVersion, awk to split by ":" and cut to remove leading/trailing spaces
app_version=$(grep 'appVersion:' "$chart_yaml_path" | awk -F: '{gsub(/^[ \t]+|[ \t]+$/,"", $2); print $2}')
echo "IMAGE_VERSION=$app_version" >> $GITHUB_ENV
echo "IMAGE_VERSION={{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
echo "LATEST_IMAGE_TAG=alpha" >> $GITHUB_ENV
- name: Push image
Expand Down

0 comments on commit 7bfbb1b

Please sign in to comment.