Skip to content

Commit

Permalink
Merge pull request #29 from stv0g/update-deps
Browse files Browse the repository at this point in the history
Update GitHub actions
  • Loading branch information
zimbatm authored Mar 11, 2024
2 parents a389312 + 2461b08 commit a77a9ae
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 34 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Checkout
uses: actions/checkout@v4

- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod

- name: Build
run: go build -v .
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: goreleaser

on:
pull_request:
push:
tags:
- 'v*'
Expand All @@ -13,22 +12,22 @@ jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.16
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
go-version-file: go.mod

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13 changes: 7 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ builds:
- linux
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- name_template: >-
{{- .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.16 as builder
FROM golang:1.19 as builder

WORKDIR /go/src/app
COPY go.mod go.sum ./
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nar-serve - serve NAR file content
# nar-serve - Serve NAR file content directly from cache

Push your build artifacts to one place.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/numtide/nar-serve

go 1.18
go 1.19

require (
cloud.google.com/go/storage v1.39.0
Expand Down
18 changes: 12 additions & 6 deletions tests/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# with the minio package
```
# Tests

## With the minio package

```shell
mkdir nar
minio server ./nar
```

# with the pkgs.minio-client package
## With the pkgs.minio-client package

```
```shell
mc config host add mycloud http://127.0.0.1:9000 accesskey secretkey
mc mb mycloud/nar
AWS_ACCESS_KEY_ID=accesskey AWS_SECRET_ACCESS_KEY=secretkey nix copy --to "s3://nar?region=eu-west-1&endpoint=127.0.0.1:9000&scheme=http" /nix/store/irfa91bs2wfqyh2j9kl8m3rcg7h72w4m-curl-7.71.1-bin
```

# run the test
`go run main.go`
## Run the test

```shell
go run main.go
```

0 comments on commit a77a9ae

Please sign in to comment.