-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: prepare spec file only in the last stage
- Loading branch information
Showing
1 changed file
with
6 additions
and
11 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 |
---|---|---|
|
@@ -48,27 +48,21 @@ jobs: | |
repository: ${{ inputs.repo }}/reva | ||
path: reva | ||
ref: ${{ inputs.branch }} | ||
- name: Bump version in spec file | ||
run: | | ||
export GOPATH=$(pwd)/go | ||
export PATH=$PATH:$GOPATH/bin | ||
cd reva | ||
export REVAVER="Reva commit $(git rev-parse --short HEAD) at ${{ inputs.repo }}/${{ inputs.branch }}" | ||
cd ../reva-release | ||
go run prepare_release.go -author "cernbox-admins[bot]" -email "[email protected]" -reva-version "$REVAVER" | ||
echo "version=$(awk '$1 == "Version:" {print $2}' cernbox-revad.spec)" >> $GITHUB_ENV | ||
echo "Reva version is "\""$REVAVER"\" | ||
- name: Copy necessary files for building the RPMs | ||
run: | | ||
cp reva-release/Makefile reva/Makefile.rpm | ||
cp reva-release/cernbox-revad.spec reva/cernbox-revad.spec | ||
- name: Create reva RPMs | ||
id: reva-rpms | ||
run: | | ||
set -x | ||
export GOPATH=$(pwd)/go | ||
export PATH=$PATH:$GOPATH/bin | ||
rm -rf ~/.cache/go-build | ||
cd reva | ||
export REVAVER="Reva commit $(git rev-parse --short HEAD) at ${{ inputs.repo }}/${{ inputs.branch }}" | ||
echo "Building ${REVAVER}" | ||
echo "revaVer=$REVAVER" >> "$GITHUB_OUTPUT" | ||
make -f Makefile.rpm rpm | ||
mkdir /release | ||
mv cernbox-*.rpm /release | ||
|
@@ -97,8 +91,9 @@ jobs: | |
run: | | ||
export GOPATH=$(pwd)/go | ||
export PATH=$PATH:$GOPATH/bin | ||
echo "Reva version was '${{ steps.reva-rpms.outputs.revaVer }}'" | ||
cd reva-release | ||
go run prepare_release.go -author "cernbox-admins[bot]" -email "[email protected]" | ||
go run prepare_release.go -author "cernbox-admins[bot]" -email "[email protected]" -reva-version "${{ steps.reva-rpms.outputs.revaVer }}" | ||
echo "version=$(awk '$1 == "Version:" {print $2}' cernbox-revad.spec)" >> $GITHUB_ENV | ||
- name: Push version | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
|