Skip to content

Commit

Permalink
Switch to public repo (#282)
Browse files Browse the repository at this point in the history
- remove hack script
- remove `GOPRIVATE`
  • Loading branch information
damyan authored Feb 28, 2024
1 parent 2d1fd2a commit 4c78058
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ jobs:
with:
go-version-file: go.mod

- name: Configure git for private modules
run: ./hack/setup-git-redirect.sh
env:
GITHUB_PAT: ${{ secrets.BOT_PAT }}

- name: Lint golang sources
uses: golangci/golangci-lint-action@v4
with:
Expand All @@ -58,11 +53,6 @@ jobs:
with:
go-version-file: go.mod

- name: Configure git for private modules
run: ./hack/setup-git-redirect.sh
env:
GITHUB_PAT: ${{ secrets.BOT_PAT }}

- name: Run tests
run: make test

Expand Down Expand Up @@ -141,7 +131,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GOPRIVATE=github.com/onmetal/*
secrets: |
"github_pat=${{ secrets.BOT_PAT }}"
7 changes: 1 addition & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
FROM golang:1.22.0 as builder

ARG GOARCH
ARG GOPRIVATE

WORKDIR /workspace
# Copy the Go Modules manifests
Expand All @@ -12,11 +11,7 @@ COPY go.sum go.sum
COPY hack/ hack/
# cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN --mount=type=ssh --mount=type=secret,id=github_pat \
--mount=type=cache,target=/root/.cache/go-build \
--mount=type=cache,target=/go/pkg \
GITHUB_PAT_PATH=/run/secrets/github_pat ./hack/setup-git-redirect.sh \
&& mkdir -p -m 0600 ~/.ssh \
RUN mkdir -p -m 0600 ~/.ssh \
&& ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts \
&& go mod download

Expand Down
17 changes: 0 additions & 17 deletions hack/setup-git-redirect.sh

This file was deleted.

0 comments on commit 4c78058

Please sign in to comment.