Skip to content

Commit bb657cb

Browse files
Up
1 parent e3053d5 commit bb657cb

6 files changed

Lines changed: 56 additions & 56 deletions

File tree

.github/workflows/release.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: 1.20
24+
- name: Run GoReleaser
25+
uses: goreleaser/goreleaser-action@v5
26+
with:
27+
distribution: goreleaser
28+
version: latest
29+
args: release --clean
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Upload assets
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: basic-auth-reverse-proxy
36+
path: dist/*

.goreleaser.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1-
before:
2-
hooks:
3-
- go mod download
41
builds:
52
- env:
63
- CGO_ENABLED=0
7-
- GO111MODULE=on
4+
goos:
5+
- linux
6+
goarch:
7+
- amd64
88
dockers:
9-
- image_templates:
10-
- angelbarrera92/{{.ProjectName}}:latest
11-
- angelbarrera92/{{.ProjectName}}:v{{ .Major }}
12-
- angelbarrera92/{{.ProjectName}}:{{ .Tag }}
9+
- image_templates:
10+
- 'ghcr.io/angelbarrera92/basic-auth-reverse-proxy:{{ .Tag }}'
11+
dockerfile: Dockerfile
12+
build_flag_templates:
13+
- "--pull"
14+
- "--label=org.opencontainers.image.created={{.Date}}"
15+
- "--label=org.opencontainers.image.name={{.ProjectName}}"
16+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
17+
- "--label=org.opencontainers.image.version={{.Version}}"
18+
- "--label=org.opencontainers.image.source={{.GitURL}}"

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/angelbarrera92/basic-auth-reverse-proxy
22

3-
go 1.12
3+
go 1.20
44

55
require (
66
gopkg.in/urfave/cli.v1 v1.20.0
7-
gopkg.in/yaml.v2 v2.3.0
7+
gopkg.in/yaml.v2 v2.4.0
88
)

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+
22
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
33
gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0=
44
gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0=
5-
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
6-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
7-
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
8-
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
5+
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
6+
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=

proxy/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package proxy
22

33
import (
4-
"io/ioutil"
4+
"os"
55

66
"gopkg.in/yaml.v2"
77
)
@@ -19,7 +19,7 @@ type User struct {
1919

2020
// ParseConfig read a configuration file in the path `location` and returns an Authn object
2121
func ParseConfig(location *string) (*Authn, error) {
22-
data, err := ioutil.ReadFile(*location)
22+
data, err := os.ReadFile(*location)
2323
if err != nil {
2424
return nil, err
2525
}

0 commit comments

Comments
 (0)