mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
build-system: replace repetitive GH Action code with script call
This is now much easier to maintain. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4527abe936
commit
f1ac55d322
7 changed files with 7 additions and 91 deletions
14
.github/workflows/android.yml
vendored
14
.github/workflows/android.yml
vendored
|
@ -25,19 +25,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd $BUILD_ROOT # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: store dummy version and build number for non-push build runs
|
||||
|
|
14
.github/workflows/fedora-copr-build.yml
vendored
14
.github/workflows/fedora-copr-build.yml
vendored
|
@ -29,19 +29,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup API token for copr-cli
|
||||
|
|
14
.github/workflows/linux-snap.yml
vendored
14
.github/workflows/linux-snap.yml
vendored
|
@ -24,19 +24,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: store dummy version and build number for pull request
|
||||
|
|
14
.github/workflows/linux-trusty-5.12.yml
vendored
14
.github/workflows/linux-trusty-5.12.yml
vendored
|
@ -21,19 +21,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: store dummy version and build number for pull request
|
||||
|
|
14
.github/workflows/mac.yml
vendored
14
.github/workflows/mac.yml
vendored
|
@ -18,19 +18,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: store dummy version and build number for pull request
|
||||
|
|
14
.github/workflows/ubuntu-launchpad-build.yml
vendored
14
.github/workflows/ubuntu-launchpad-build.yml
vendored
|
@ -18,19 +18,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Setup build dependencies
|
||||
|
|
14
.github/workflows/windows.yml
vendored
14
.github/workflows/windows.yml
vendored
|
@ -21,19 +21,7 @@ jobs:
|
|||
id: version_number
|
||||
if: github.event_name == 'push'
|
||||
run: |
|
||||
cd .. # check out parallel to subsurface sources
|
||||
url="https://subsurface:${{ secrets.NIGHTLY_BUILDS }}@github.com/subsurface/nightly-builds"
|
||||
# the clone followed by the pointless push should verify that the password is stored in the config
|
||||
# that way the script doesn't need the password
|
||||
git clone -b main https://github.com/subsurface/nightly-builds
|
||||
cd nightly-builds
|
||||
git remote set-url origin "$url"
|
||||
git push origin main
|
||||
cd ..
|
||||
bash -x subsurface/scripts/get-or-create-build-nr.sh ${{ github.sha }}
|
||||
cp nightly-builds/latest-subsurface-buildnumber subsurface
|
||||
echo "CICD-release" > subsurface/latest-subsurface-buildnumber-extension
|
||||
version=$(bash subsurface/scripts/get-version)
|
||||
version=$(bash subsurface/scripts/get-atomic-buildnr.sh ${{ github.sha }} ${{ secrets.NIGHTLY_BUILDS }} "CICD-release")
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: store dummy version and build number for pull request
|
||||
|
|
Loading…
Reference in a new issue