Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): test-imports workflow breaks when called from a fork #2946

Merged
merged 9 commits into from
Sep 3, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test-import.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ jobs:

- name: Run test Go program that imports Zarf
run: |
cd $(mktemp -d)
cd ..
mkdir test-import
cd test-import
echo "$GO_MAIN" > main.go
go mod init github.com/zarf-dev/test-import
go mod edit -replace github.com/zarf-dev/zarf=github.com/${{ github.repository }}@${COMMIT_SHA:0:12}
go mod edit -replace github.com/zarf-dev/zarf=../zarf
go mod tidy
cat go.mod | grep -q ${COMMIT_SHA:0:12}
AustinAbro321 marked this conversation as resolved.
Show resolved Hide resolved
go run main.go
env:
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
GO_MAIN: |
package main

Expand Down