Skip to content

Commit

Permalink
fix: remove before script
Browse files Browse the repository at this point in the history
  • Loading branch information
gabyx committed Jul 5, 2024
1 parent a26f21c commit 578be48
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
51 changes: 30 additions & 21 deletions .github/workflows/normal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ jobs:
with:
fetch-depth: 0

- name: Setup Git
run: |
just nix-develop ./tools/ci/setup-git.sh
- name: Format
run: |
source tools/ci/before-script.sh &&
cat justfile &&
just nix-develop just format
lint:
Expand All @@ -56,15 +58,17 @@ jobs:
with:
fetch-depth: 0

- name: Setup Git
run: |
just nix-develop ./tools/ci/setup-git.sh
- name: Lint
run: |
source tools/ci/before-script.sh &&
just nix-develop just lint
- name: Lint Undefined-Behavior
continue-on-error: true
run: |
source tools/ci/before-script.sh &&
just nix-develop just lint-ub
- name: Allow to fail
Expand All @@ -78,14 +82,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Git
run: |
just nix-develop ./tools/ci/setup-git.sh
- name: build
run: |
source tools/ci/before-script.sh &&
just nix-develop just build
- name: tests
run: |
source tools/ci/before-script.sh &&
just nix-develop just test
test:
Expand All @@ -98,9 +106,12 @@ jobs:
with:
fetch-depth: 0

- name: Setup Git
run: |
just nix-develop ./tools/ci/setup-git.sh
- name: Test
run: |
source tools/ci/before-script.sh &&
just nix-develop just test
package:
Expand All @@ -116,15 +127,13 @@ jobs:
with:
fetch-depth: 0

- name: Build derivation with nix
- name: Setup Git
run: |
source tools/ci/before-script.sh &&
just nix-package
just nix-develop ./tools/ci/setup-git.sh
- name: Build the image with nix
- name: Build derivation with nix
run: |
source tools/ci/before-script.sh &&
just nix-package
just nix-develop just nix-package
deploy:
runs-on: ubuntu-latest
Expand All @@ -140,22 +149,22 @@ jobs:
with:
fetch-depth: 0

- name: Setup Git
run: |
just nix-develop ./tools/ci/setup-git.sh
- name: Create version tag (if release)
run: |
source tools/ci/before-script.sh &&
./tools/ci/assert-tag.sh "$GITHUB_REF"
just nix-develop ./tools/ci/assert-tag.sh "$GITHUB_REF"
- name: Build container image (nix)
run: |
source tools/ci/before-script.sh &&
just nix-image
just nix-develop just nix-image
- name: Push image (if release)
run: |
source tools/ci/before-script.sh &&
tools/ci/upload-image.sh
just nix-develop tools/ci/upload-image.sh
- name: Push tag (if release)
run: |
source tools/ci/before-script.sh &&
./tools/ci/assert-tag.sh --push "$GITHUB_REF"
just nix-develop ./tools/ci/assert-tag.sh --push "$GITHUB_REF"
5 changes: 0 additions & 5 deletions tools/ci/before-script.sh → tools/ci/setup-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,4 @@ git config --global safe.directory "*" || {
ROOT_DIR=$(git rev-parse --show-toplevel)
. "$ROOT_DIR/tools/general.sh"

print_info "Current dir: '$(pwd)'"
print_info "Running as user: $(id)"

ci_setup_git

unset ROOT_DIR

0 comments on commit 578be48

Please sign in to comment.