Compare commits

..

2 commits

Author SHA1 Message Date
01b3a2028b
Adjust Environment Variable Test
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 23s
Build binary file and bundle packages / test-env (pull_request) Failing after 2s
2024-08-07 19:52:08 +02:00
a6b35ec488
Formatting Changes 2024-08-07 19:51:59 +02:00
3 changed files with 37 additions and 41 deletions

View file

@ -106,11 +106,9 @@ jobs:
if: success()
runs-on: docker
steps:
-
name: Downloading All Build Artifacts
- name: Downloading All Build Artifacts
uses: actions/download-artifact@v3
-
name: Upload Debian Package to staging
- name: Upload Debian Package to staging
run: |
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
--upload-file release_blobs/${{ needs.build.outputs.debian_name }}_'${{ needs.build.outputs.debian_ref }}${{ needs.build.outputs.debian_rev }}'_amd64.deb \
@ -118,8 +116,8 @@ jobs:
curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
--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
- name: Upload Debian Package to main
if: (! contains(github.ref_name, '-rc'))
run: |
echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \
@ -134,11 +132,10 @@ jobs:
if: success()
runs-on: docker
steps:
-
name: Downloading All Build Artifacts
- name: Downloading All Build Artifacts
uses: actions/download-artifact@v3
-
name: Release New Version
- name: Release New Version
uses: actions/forgejo-release@v2
with:
direction: upload

View file

@ -11,14 +11,13 @@ jobs:
runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps:
-
name: Add Clippy
- name: Add Clippy
run: rustup component add clippy
-
name: Checking Out Repository Code
- name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache
- name: Set Up Cargo Cache
uses: actions/cache@v3
with:
path: |
@ -28,8 +27,8 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy
- name: Run Clippy
run: cargo clippy
build:
@ -42,19 +41,18 @@ jobs:
DEBIAN_REV: ${{ steps.deb_bundle.outputs.debian_rev }}
DEBIAN_REF: ${{ steps.deb_bundle.outputs.debian_ref }}
steps:
-
name: Checking Out Repository Code
- name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
-
name: Prepare build environment
- name: Prepare build environment
run: mkdir dist
-
name: Compiling To Linux Target
- name: Compiling To Linux Target
run: |
cargo build -r
mv target/release/${{ github.event.repository.name }} dist/${{ github.event.repository.name }}-linux-amd64
-
name: Bundle .deb package
- name: Bundle .deb package
id: deb_bundle
run: |
cargo deb
@ -65,8 +63,8 @@ jobs:
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
- name: Uploading Build Artifact
uses: actions/upload-artifact@v3
with:
name: release_blobs
@ -78,9 +76,11 @@ jobs:
if: success()
runs-on: docker
steps:
-
name: Test Debian Variables
- name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
- 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 " ")
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 " "

View file

@ -12,14 +12,13 @@ jobs:
runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-node:latest
steps:
-
name: Add Clippy
- name: Add Clippy
run: rustup component add clippy
-
name: Checking Out Repository Code
- name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
-
name: Set Up Cargo Cache
- name: Set Up Cargo Cache
uses: actions/cache@v3
with:
path: |
@ -29,6 +28,6 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
-
name: Run Clippy
- name: Run Clippy
run: cargo clippy