Skip to content

Commit

Permalink
build: Configure private repos to be fetched via Git instead of Go proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
pojntfx committed Jun 19, 2024
1 parent 752dd7f commit add7e00
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/hydrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ jobs:
strategy:
matrix:
target:
# Tests
- id: test
src: .
os: golang:bookworm
flags: -e '-v /tmp/ssh-key:/tmp/ssh-key'
cmd: GOFLAGS="-short" ./Hydrunfile test
dst: out/nonexistent
runner: depot-ubuntu-22.04-32

# Binaries
- id: go.drafter-nat
src: .
os: golang:bookworm
Expand Down Expand Up @@ -92,6 +95,7 @@ jobs:
cmd: ./Hydrunfile go drafter-terminator
dst: out/*
runner: depot-ubuntu-22.04-32


steps:
- name: Maximize build space
Expand Down
6 changes: 6 additions & 0 deletions Hydrunfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ if [ "$1" = "test" ]; then
# Configure SSH access
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
mkdir -p ~/.ssh
ssh-keyscan github.com >>~/.ssh/known_hosts

# Configure Git
git config --global --add safe.directory '*'
git config --global url."ssh://git@github.com/".insteadOf "https://github.com/"

# Generate dependencies
make depend
Expand All @@ -25,6 +28,8 @@ if [ "$1" = "go" ]; then
# Configure SSH access
eval "$(ssh-agent -s)"
ssh-add /tmp/ssh-key
mkdir -p ~/.ssh
ssh-keyscan github.com >>~/.ssh/known_hosts

# Install native dependencies
apt update
Expand All @@ -36,6 +41,7 @@ if [ "$1" = "go" ]; then

# Configure Git
git config --global --add safe.directory '*'
git config --global url."ssh://git@github.com/".insteadOf "https://github.com/"

# Generate dependencies
make depend
Expand Down

0 comments on commit add7e00

Please sign in to comment.