Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build linux packages nightly #5418

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/debrepo/repo_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function exit_on_fail() {

function exit_usage() {
printf "Fail: $1\n"
printf "Usage: repo_update.sh <allow-create> <repo-url> <incoming-dir> [osversion(jammy,focal,buster,bullseye)] [release-type(stable,alpha)] [release-key]\n"
printf "Usage: repo_update.sh <allow-create> <repo-url> <incoming-dir> [osversion(jammy,focal,buster,bullseye)] [release-type(stable,alpha,nightly)] [release-key]\n"
exit 1
}

Expand Down Expand Up @@ -58,6 +58,8 @@ if [[ ! "$5" == "" ]]; then
;;
"alpha") TYPE="alpha"
;;
"nightly") TYPE="nightly"
;;
"*") exit_usage "Unrecognized repo type specified: $5"
;;
esac
Expand Down
48 changes: 40 additions & 8 deletions .github/workflows/linux-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ name: Linux Package
on:
push:
tags: [ 'client_release/**' ]
schedule:
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand Down Expand Up @@ -447,16 +449,31 @@ jobs:
with:
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Check if Release type is alpha
if: ${{ success() && env.SKIP_RUN == 0 && startsWith(github.ref, 'refs/tags/') }}
run: |
RELEASE_TYPE=alpha
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Check if Release type is nightly
if: ${{ success() && env.SKIP_RUN == 0 && github.ref == 'refs/heads/master' }}
run: |
RELEASE_TYPE=nightly
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Check if Release type is not set
if: ${{ success() && env.SKIP_RUN == 0 && env.RELEASE_TYPE == 0 }}
run: |
RELEASE_TYPE=nightly
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Update or create the repository using aptly
if: ${{ success() && env.SKIP_RUN == 0 }}
run: |
# 0 true / 1 false
ALLOW_CREATE=0
cd ${{ github.workspace }}/.github/workflows/debrepo/
# alpha or stable
RELEASE_TYPE=alpha
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${{ github.workspace }} ${{ matrix.os }} ${RELEASE_TYPE} ${{ env.PUBKEY }}
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${{ github.workspace }} ${{ matrix.os }} ${{ env.RELEASE_TYPE }} ${{ env.PUBKEY }}

- uses: actions/upload-artifact@v3
if: ${{ success() && env.SKIP_RUN == 0 }}
Expand Down Expand Up @@ -531,20 +548,35 @@ jobs:
with:
name: linux-package_manager_${{ matrix.os }}_${{ github.event.pull_request.head.sha }}

- name: Check if Release type is alpha
if: ${{ success() && env.SKIP_RUN == 0 && startsWith(github.ref, 'refs/tags/') }}
run: |
RELEASE_TYPE=alpha
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Check if Release type is nightly
if: ${{ success() && env.SKIP_RUN == 0 && github.ref == 'refs/heads/master' }}
run: |
RELEASE_TYPE=nightly
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Check if Release type is not set
if: ${{ success() && env.SKIP_RUN == 0 && env.RELEASE_TYPE == 0 }}
run: |
RELEASE_TYPE=nightly
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV

- name: Update or create the repository
if: ${{ success() && env.SKIP_RUN == 0 }}
run: |
# Bash scripts do not support boolean values so convert to 0 true / 1 false
# 0 true / 1 false
ALLOW_CREATE=0
# alpha or stable
RELEASE_TYPE=alpha
echo "RELEASE_TYPE=${RELEASE_TYPE}" >> $GITHUB_ENV
CWD=$(pwd)

cd .github/workflows/rpmrepo/
# Updates or creates the repository
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${CWD} ${{ matrix.os }} ${RELEASE_TYPE} ${{ env.PUBKEY }} ${{ env.PUBKEY_HASH }} ${{ env.ARCH }}
./repo_update.sh "$ALLOW_CREATE" ${{ env.BASEREPO }} ${CWD} ${{ matrix.os }} ${{ env.RELEASE_TYPE }} ${{ env.PUBKEY }} ${{ env.PUBKEY_HASH }} ${{ env.ARCH }}

- uses: actions/upload-artifact@v3
if: ${{ success() && env.SKIP_RUN == 0 }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/rpmrepo/repo_update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ if [[ ! "$5" == "" ]]; then
;;
"alpha") TYPE="alpha"
;;
"nightly") TYPE="nightly"
;;
"*") exit_usage "Unrecognized repo type specified: $5"
;;
esac
Expand Down
Loading