diff --git a/.github/workflows/qubes-dom0-packagev2.yml b/.github/workflows/qubes-dom0-packagev2.yml index 972d933..d29e113 100644 --- a/.github/workflows/qubes-dom0-packagev2.yml +++ b/.github/workflows/qubes-dom0-packagev2.yml @@ -13,6 +13,16 @@ on: Relative path to directory containing Qubes OS package. required: false type: string + qubes-pkg-revision: + description: > + Forced revision of a package. + required: false + type: string + qubes-pkg-version: + description: > + Forced version of a package. + required: false + type: string jobs: build-and-package: @@ -33,6 +43,8 @@ jobs: - uses: actions/checkout@v4 with: repository: QubesOS/qubes-builderv2 + ref: 80dd898cc0472dd99f161f1d1c7c44da64de93f2 + fetch-depth: 0 - name: Cache Docker image and dom0 stuff uses: actions/cache@v4 @@ -65,12 +77,14 @@ jobs: URL: ${{ github.repositoryUrl }} COMPONENT: ${{ inputs.qubes-component }} PKG_DIR: ${{ inputs.qubes-pkg-src-dir }} + PKG_REV: ${{ inputs.qubes-pkg-revision }} + PKG_VER: ${{ inputs.qubes-pkg-version }} # Following 2 variables are used in double expansion '${${{ github.ref_type }}}', # do not change these names even though they don't follow the convention. branch: ${{ github.head_ref }} tag: ${{ github.ref_name }} run: | - cp example-configs/qubes-os-main.yml builder.yml + cp example-configs/qubes-os-r4.2.yml builder.yml # Switch from Qubes to Docker executor sed -i "/^executor:$/,+4d; /^#executor:$/,+3s/#//" builder.yml @@ -107,9 +121,16 @@ jobs: # Temporary file handles case when qubes-pkg-src-dir is set to '.' mv "$clone_dir/$COMPONENT.spec.in.tmp" "$clone_dir/$COMPONENT.spec.in" - echo 1 > "$clone_dir/rel" - echo "0+$(git -C "$clone_dir" show-ref -s "$branch_name" | head -1)" \ - > "$clone_dir/version" + if [ -z "$PKG_REV" ]; then + PKG_REV=1 + fi + echo "$PKG_REV" > "$clone_dir/rel" + + if [ -z "$PKG_VER" ]; then + PKG_VER="0+$(git -C "$clone_dir" show-ref -s "$branch_name" | head -1)" + fi + echo "$PKG_VER" > "$clone_dir/version" + cat > "$clone_dir/.qubesbuilder" <