CI Cross-Job Var Fix Attempt
Some checks failed
Run Tests on Code / run-tests (push) Successful in 12s
Build binary file and bundle packages / test (pull_request) Successful in 11s
Build binary file and bundle packages / build (pull_request) Successful in 28s
Build binary file and bundle packages / test-env (pull_request) Failing after 0s
Some checks failed
Run Tests on Code / run-tests (push) Successful in 12s
Build binary file and bundle packages / test (pull_request) Successful in 11s
Build binary file and bundle packages / build (pull_request) Successful in 28s
Build binary file and bundle packages / test-env (pull_request) Failing after 0s
This commit is contained in:
parent
99a7811459
commit
713bbb550a
2 changed files with 31 additions and 6 deletions
|
@ -47,6 +47,10 @@ jobs:
|
|||
if: success()
|
||||
runs-on: docker
|
||||
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
|
||||
outputs:
|
||||
DEBIAN_NAME: ${{ steps.deb_bundle.outputs.debian_name }}
|
||||
DEBIAN_REV: ${{ steps.deb_bundle.outputs.debian_rev }}
|
||||
DEBIAN_REF: ${{ steps.deb_bundle.outputs.debian_ref }}
|
||||
steps:
|
||||
-
|
||||
name: Checking Out Repository Code
|
||||
|
@ -109,20 +113,20 @@ jobs:
|
|||
name: Upload Debian Package to staging
|
||||
run: |
|
||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_'${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}'_amd64.deb \
|
||||
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_'${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}'_amd64.deb \
|
||||
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload'
|
||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}_amd64.deb \
|
||||
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}_amd64.deb \
|
||||
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/staging/upload
|
||||
-
|
||||
name: Upload Debian Package to main
|
||||
if: (! contains(github.ref_name, '-rc'))
|
||||
run: |
|
||||
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_'${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}'_amd64.deb \
|
||||
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_'${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}'_amd64.deb \
|
||||
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload'
|
||||
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
|
||||
--upload-file release_blobs/${{ steps.deb_bundle.outputs.debian_name }}_${{ steps.deb_bundle.outputs.debian_ref }}${{ steps.deb_bundle.outputs.debian_rev }}_amd64.deb \
|
||||
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}_amd64.deb \
|
||||
${{ env.GITHUB_API_URL }}/packages/${{ env.GITHUB_REPOSITORY_OWNER }}/debian/pool/bookworm/main/upload
|
||||
|
||||
create-release:
|
||||
|
|
|
@ -37,6 +37,10 @@ jobs:
|
|||
if: success()
|
||||
runs-on: docker
|
||||
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
|
||||
outputs:
|
||||
DEBIAN_NAME: ${{ steps.deb_bundle.outputs.debian_name }}
|
||||
DEBIAN_REV: ${{ steps.deb_bundle.outputs.debian_rev }}
|
||||
DEBIAN_REF: ${{ steps.deb_bundle.outputs.debian_ref }}
|
||||
steps:
|
||||
-
|
||||
name: Checking Out Repository Code
|
||||
|
@ -51,10 +55,15 @@ jobs:
|
|||
mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64
|
||||
-
|
||||
name: Bundle .deb package
|
||||
id: deb_bundle
|
||||
run: |
|
||||
cargo deb
|
||||
DEBIAN_REF=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " " | tr - \~)
|
||||
DEBIAN_REF=$(echo ${{ github.ref_name }} | tr - \~)
|
||||
echo "debian_ref=$DEBIAN_REF" >> ${{ env.GITHUB_OUTPUT }}
|
||||
DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||
echo "debian_rev=$DEBIAN_REV" >> ${{ env.GITHUB_OUTPUT }}
|
||||
DEBIAN_NAME=-$(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||
echo "debian_name=$DEBIAN_NAME" >> ${{ env.GITHUB_OUTPUT }}
|
||||
mv target/debian/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ DEBIAN_NAME }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb
|
||||
-
|
||||
name: Uploading Build Artifact
|
||||
|
@ -62,4 +71,16 @@ jobs:
|
|||
with:
|
||||
name: release_blobs
|
||||
path: dist
|
||||
if-no-files-found: error
|
||||
if-no-files-found: error
|
||||
|
||||
test-env:
|
||||
needs: build
|
||||
if: success()
|
||||
runs-on: docker
|
||||
steps:
|
||||
-
|
||||
name: Test Debian Variables
|
||||
run: |
|
||||
test ${{ needs.build.outputs.debian_name }} = $(echo ${{ github.ref_name }} | tr - \~)
|
||||
test ${{ needs.build.outputs.debian_ref }} = $(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||
test ${{ needs.build.outputs.debian_rev }} = $(cat Cargo.toml | grep -E "(^|\|)name =" | cut -f2- -d= | tr -d \" | tr -d " ")
|
||||
|
|
Loading…
Reference in a new issue