-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use get-latest action to avoid skip issues with git after CVE-2022-24765
- Loading branch information
Showing
1 changed file
with
10 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,8 +241,12 @@ jobs: | |
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: actions-ecosystem/action-get-latest-tag@v1 | ||
id: latest-tag | ||
with: | ||
fetch-depth: 0 | ||
semver_only: true | ||
initial_version: 0.0.1 | ||
|
||
- name: Prepare .changes file | ||
# The .changes file is updated only in release creation. This current task should be improved | ||
|
@@ -252,18 +256,16 @@ jobs: | |
CHANGES_FILE=$PACKAGE_NAME.changes | ||
osc checkout $OBS_PROJECT $PACKAGE_NAME $CHANGES_FILE | ||
mv $CHANGES_FILE $FOLDER | ||
VERSION=$(./hack/get_version_from_git.sh) | ||
TAG=$(echo $VERSION | cut -f1 -d+) | ||
hack/gh_release_to_obs_changeset.py $REPOSITORY -a [email protected] -t $TAG -f $FOLDER/$CHANGES_FILE | ||
VERSION=${{ steps.latest-tag.outputs.tag }} | ||
hack/gh_release_to_obs_changeset.py $REPOSITORY -a [email protected] -t $VERSION -f $FOLDER/$CHANGES_FILE | ||
- name: Set version | ||
run: | | ||
VERSION=$(./hack/get_version_from_git.sh) | ||
TAG=$(echo $VERSION | cut -f1 -d+) | ||
VERSION=${{ steps.latest-tag.outputs.tag }} | ||
sed -i 's~%%REVISION%%~${{ github.sha }}~' $FOLDER/_service && \ | ||
sed -i 's~%%REPOSITORY%%~${{ github.repository }}~' $FOLDER/_service && \ | ||
sed -i 's~%%VERSION%%~'"${TAG}"'~' $FOLDER/_service && \ | ||
sed -i 's~%%VERSION%%~'"${TAG}"'~' $FOLDER/Dockerfile | ||
sed -i 's~%%VERSION%%~'"${VERSION}"'~' $FOLDER/_service && \ | ||
sed -i 's~%%VERSION%%~'"${VERSION}"'~' $FOLDER/Dockerfile | ||
- name: Configure OSC | ||
# OSC credentials must be configured beforehand as the HOME variables cannot be changed from /github/home | ||
|