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

Bump github workflows to 1.22 #885

Merged
merged 3 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: '1.20.6'
go-version: '1.22.4'

- uses: actions/checkout@v4
with:
Expand All @@ -36,7 +36,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: '1.20.6'
go-version: '1.22.4'

- uses: actions/checkout@v4
with:
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v5
with:
go-version: '1.20.6'
go-version: '1.22.4'

- uses: actions/checkout@v4
with:
Expand All @@ -67,7 +67,7 @@ jobs:
uses: golangci/golangci-lint-action@v6
with:
working-directory: git-sync
version: v1.53.3
version: v1.59.0

- name: make lint
working-directory: git-sync
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,6 @@ lint-staticcheck:
go run honnef.co/go/tools/cmd/staticcheck@2023.1.3

lint-golangci-lint:
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3 run
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.0 run

lint: lint-staticcheck lint-golangci-lint
2 changes: 2 additions & 0 deletions _test_tools/httpd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ RUN htpasswd -b -c /etc/htpasswd testuser testpass

# Callers should mount a directory with git repos here.
VOLUME /git
# sshd runs as root, and the repo directory might be owned by anyone.
RUN git config --system safe.directory '*'

COPY nginx.conf /etc/nginx/
COPY run.sh /
Expand Down
2 changes: 2 additions & 0 deletions _test_tools/sshd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ VOLUME /dot_ssh

# Callers should mount a directory with git repos here.
VOLUME /git
# sshd runs as root, and the repo directory might be owned by anyone.
RUN git config --system safe.directory '*'

# Callers can SSH as user "test"
RUN echo "test:x:65533:65533::/home/test:/usr/bin/git-shell" >> /etc/passwd
Expand Down
12 changes: 11 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func main() {
flVersion := pflag.Bool("version", false, "print the version and exit")
flHelp := pflag.BoolP("help", "h", false, "print help text and exit")
pflag.BoolVarP(flHelp, "__?", "?", false, "print help text and exit") // support -? as an alias to -h
pflag.CommandLine.MarkHidden("__?")
mustMarkHidden("__?")
flManual := pflag.Bool("man", false, "print the full manual and exit")

flVerbose := pflag.IntP("verbose", "v",
Expand Down Expand Up @@ -923,6 +923,16 @@ func mustMarkDeprecated(name string, usageMessage string) {
}
}

// mustMarkHidden is a helper around pflag.CommandLine.MarkHidden.
// It panics if there is an error (as these indicate a coding issue).
// This makes it easier to keep the linters happy.
func mustMarkHidden(name string) {
err := pflag.CommandLine.MarkHidden(name)
if err != nil {
panic(fmt.Sprintf("error marking flag %q as hidden: %v", name, err))
}
}

// makeAbsPath makes an absolute path from a path which might be absolute
// or relative. If the path is already absolute, it will be used. If it is
// not absolute, it will be joined with the provided root. If the path is
Expand Down
Loading