This commit is contained in:
parent
aa139b5a09
commit
c7975ea667
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -10,6 +10,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- run: nix develop . -c golangci-lint run --enable-all
|
||||
- run: nix develop . -c go test -v -race ./...
|
||||
- run: nix develop . -c skopeo --insecure-policy copy --dest-username ${{ github.actor }} --dest-password ${{ secrets.GITHUB_TOKEN }} docker-archive://$(nix build .#docker --print-out-paths) docker://ghcr.io/xsteadfastx/caddy-log-exporter:${{ github.ref_name }}
|
||||
- run: nix develop . -c task ci-publish --GITHUB_USERNAME ${{ github.actor }} --GITHUB_PASSWORD ${{ secrets.GITHUB_TOKEN }} --GIT_TAG ${{ github.ref_name }}
|
||||
|
3
.github/workflows/test.yml
vendored
3
.github/workflows/test.yml
vendored
@ -12,5 +12,4 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v27
|
||||
- run: nix develop . -c golangci-lint run --enable-all
|
||||
- run: nix develop . -c go test -v -race ./...
|
||||
- run: nix develop . -c task ci -p
|
||||
|
39
Taskfile.yml
39
Taskfile.yml
@ -6,25 +6,42 @@ tasks:
|
||||
cmds:
|
||||
- task: lint
|
||||
- task: test
|
||||
- task: release-snapshot
|
||||
|
||||
ci-publish:
|
||||
cmds:
|
||||
- task: lint
|
||||
- task: test
|
||||
- task: docker
|
||||
|
||||
docker:
|
||||
requires:
|
||||
vars:
|
||||
- GITHUB_USERNAME
|
||||
- GITHUB_PASSWORD
|
||||
- GIT_TAG
|
||||
cmds:
|
||||
- |
|
||||
{{.NIX_CMD_BASE}} \
|
||||
skopeo \
|
||||
--insecure-policy \
|
||||
copy \
|
||||
--dest-username {{.GITHUB_USERNAME}} --dest-password {{.GITHUB_PASSWORD}} \
|
||||
docker-archive://$(nix build .#docker --print-out-paths) \
|
||||
docker://ghcr.io/xsteadfastx/caddy-log-exporter:{{.GIT_TAG}}
|
||||
|
||||
lint:
|
||||
cmds:
|
||||
- "{{.NIX_CMD_BASE}} golangci-lint run --enable-all"
|
||||
- |
|
||||
{{.NIX_CMD_BASE}} \
|
||||
golangci-lint run --enable-all
|
||||
|
||||
test:
|
||||
cmds:
|
||||
- "{{.NIX_CMD_BASE}} go test -v -race ./..."
|
||||
- |
|
||||
{{.NIX_CMD_BASE}} \
|
||||
go test -v -race ./...
|
||||
|
||||
tidy:
|
||||
cmds:
|
||||
- go mod tidy
|
||||
- go mod vendor
|
||||
|
||||
release:
|
||||
cmds:
|
||||
- "{{.NIX_CMD_BASE}} goreleaser release --clean"
|
||||
|
||||
release-snapshot:
|
||||
cmds:
|
||||
- "{{.NIX_CMD_BASE}} goreleaser release --clean --snapshot"
|
||||
|
Loading…
Reference in New Issue
Block a user