Skip to content

Commit

Permalink
upgrade actions and core
Browse files Browse the repository at this point in the history
  • Loading branch information
Peng Zhefu committed Oct 11, 2023
1 parent 2a108ad commit 2c7e005
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 33 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: "Setup go"
uses: actions/setup-go@v4

- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Setup go"
uses: actions/setup-go@v4

- name: "Build binary"
run: |
make binary
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,25 @@ jobs:
with:
fetch-depth: 0

- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3

- name: Log in to the ghcr
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the docker
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Docker meta for debug version
if: ${{ github.ref == 'refs/heads/master' }}
id: debug-meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
Expand All @@ -55,7 +55,7 @@ jobs:
- name: Build and push image
if: ${{ steps.meta.outputs.tags != '' }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: "."
platforms: linux/amd64,linux/arm64
Expand All @@ -64,7 +64,7 @@ jobs:

- name: "[debug version] Build and push image"
if: ${{ github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
context: "."
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -19,14 +19,14 @@ jobs:
echo "VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 2 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,10 @@ on:
jobs:
unittests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'

- name: unit tests
run: make test
14 changes: 8 additions & 6 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ builds:
- amd64

archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
- id: cli
name_template: >-
{{- .ProjectName }}_{{- .Version }}_
{{- 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'
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ CLI
=====
![](https://github.com/projecteru2/cli/workflows/goreleaser/badge.svg)
![](https://github.com/projecteru2/cli/workflows/golangci-lint/badge.svg)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e9a4c445afb549fea950b4353197e859)](https://www.codacy.com/gh/projecteru2/cli?utm_source=github.com&utm_medium=referral&utm_content=projecteru2/cli&utm_campaign=Badge_Grade)

CLI for Eru.

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/juju/errors v1.0.0
github.com/pkg/term v1.1.0
github.com/projecteru2/core v0.0.0-20231010184432-b89f6dbbdd1c
github.com/projecteru2/core v0.0.0-20231011045726-f834c8786ef0
github.com/sethgrid/curse v0.0.0-20181231162520-d4ee583ebf0f
github.com/sethvargo/go-signalcontext v0.2.1
github.com/sirupsen/logrus v1.9.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ github.com/pkg/term v1.1.0 h1:xIAAdCMh3QIAy+5FrE8Ad8XoDhEU4ufwbaSozViP9kk=
github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/projecteru2/core v0.0.0-20231010184432-b89f6dbbdd1c h1:t1aE9WeRcKrxyAQkzbZtacChr5cbEZ2yGAUxLkuTLiQ=
github.com/projecteru2/core v0.0.0-20231010184432-b89f6dbbdd1c/go.mod h1:fxKSjK6GhlCiV+e1eBtnJpAB7RqM021ZKIB0iZeYOXo=
github.com/projecteru2/core v0.0.0-20231011045726-f834c8786ef0 h1:+DdklqQduXehUGnJUiiFrjyDDuQnODEyvSGYSbAtIdc=
github.com/projecteru2/core v0.0.0-20231011045726-f834c8786ef0/go.mod h1:fxKSjK6GhlCiV+e1eBtnJpAB7RqM021ZKIB0iZeYOXo=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
Expand Down

0 comments on commit 2c7e005

Please sign in to comment.