-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem: gomod2nix don't use the same golang version as project (#853)
* Problem: gomod2nix don't use the same golang version as project Solution: - build updateScript in nix expression. - add workflow to check gomod2nix.toml up to date. * tweag -> nix-community
- Loading branch information
Showing
6 changed files
with
55 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -395,3 +395,32 @@ jobs: | |
❌ `/runsim` simulation test has failed 😅 | ||
Can further check [here](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
gomod2nix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- id: changed-files | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: | | ||
go.mod | ||
go.sum | ||
- uses: cachix/install-nix-action@v15 | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
- name: update gomod2nix | ||
run: nix run .#update-gomod2nix | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
- name: check working directory is clean | ||
id: changes | ||
run: | | ||
set +e | ||
(git diff --no-ext-diff --exit-code) | ||
echo ::set-output name=changed::$? | ||
- uses: actions/upload-artifact@v2 | ||
if: steps.changes.outputs.changed == 1 | ||
with: | ||
name: gomod2nix.toml | ||
path: ./gomod2nix.toml | ||
- if: steps.changes.outputs.changed == 1 | ||
run: echo "Working directory is dirty" && exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,6 @@ pkgs.mkShell { | |
buildInputs = with pkgs; [ | ||
# build tools | ||
go_1_18 | ||
gomod2nix | ||
rocksdb | ||
|
||
# lint tools | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters