Skip to content

Commit

Permalink
ci: hotfix for release
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarrosop committed Aug 29, 2024
1 parent aa51d40 commit 6218e75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
18 changes: 3 additions & 15 deletions .github/workflows/wf_build_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,11 @@ jobs:
diagnostic-endpoint: ""
use-flakehub: false

- name: "Verify if we need to build"
id: verify-build
run: |
export drvPath=$(make check-dry-run)
echo "drvPath - $drvPath"
nix store verify --no-trust --store http://127.0.0.1:37515 $drvPath \
&& export BUILD_NEEDED=no \
|| export BUILD_NEEDED=yes
echo BUILD_NEEDED=$BUILD_NEEDED >> $GITHUB_OUTPUT
echo DERIVATION_PATH=$drvPath >> $GITHUB_OUTPUT
- name: Compute common env vars
id: vars
run: |
echo "VERSION=$(make get-version VER=${{ inputs.VERSION }})" >> $GITHUB_OUTPUT
echo "ARCHITECTURE=$(uname -m)" >> $GITHUB_OUTPUT
- name: "Build artifact"
run: |
Expand All @@ -82,7 +71,7 @@ jobs:
- name: "Push artifact to artifact repository"
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.NAME }}-artifact-${{ matrix.os }}-${{ steps.vars.outputs.VERSION }}
name: ${{ inputs.NAME }}-artifact-${{ steps.vars.output.ARCHITECTURE }}-${{ steps.vars.outputs.VERSION }}
path: result/bin/hasura-storage
retention-days: 7

Expand All @@ -94,7 +83,7 @@ jobs:
- name: "Push docker image to artifact repository"
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.NAME }}-docker-image-${{ matrix.os }}-${{ steps.vars.outputs.VERSION }}
name: ${{ inputs.NAME }}-docker-image-${{ steps.vars.output.ARCHITECTURE }}-${{ steps.vars.outputs.VERSION }}
path: result
retention-days: 7
if: ${{ ( inputs.DOCKER ) }}
Expand All @@ -103,4 +92,3 @@ jobs:
# run: |
# # DEPENDENCIES=($(nix-store --query --requisites --include-outputs ${{ steps.verify-build.outputs.DERIVATION_PATH }}))
# nix copy --to http://127.0.0.1:37515 "${DEPENDENCIES[@]}" || exit 0
# if: ${{ steps.verify-build.outputs.BUILD_NEEDED == 'yes' }}
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,8 @@ build: ## Build application and places the binary under ./result/bin

.PHONY: build-dry-run
build-dry-run: ## Run nix flake check
nix build \
--dry-run \
--json \
--print-build-logs \
@nix path-info \
--derivation \
.\#packages.$(ARCH)-$(OS).default


Expand Down

0 comments on commit 6218e75

Please sign in to comment.