From 849f768708952f1ffbb0e98ec616acf318f8d704 Mon Sep 17 00:00:00 2001 From: engigu Date: Sat, 27 Jan 2024 22:38:02 +0800 Subject: [PATCH] feat: add goreleaser docker image publish --- .github/workflows/release.yml | 6 +++--- .goreleaser.yaml | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 356acdd..21d96ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: DOCKER_IMAGE_NAME: message-nest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main with: fetch-depth: 0 - run: git fetch --force --tags @@ -38,7 +38,7 @@ jobs: username: ${{ secrets.DOCKER_USER }} password: ${{ secrets.DOCKER_PASSWD }} - - uses: actions/setup-go@v3 + - uses: actions/setup-go@main with: go-version: '>=1.20.2' cache: true @@ -48,7 +48,7 @@ jobs: # More assembly might be required: Docker logins, GPG, etc. It all depends # on your needs. - - uses: goreleaser/goreleaser-action@v4 + - uses: goreleaser/goreleaser-action@v5 with: # either 'goreleaser' (default) or 'goreleaser-pro': distribution: goreleaser diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 255b42d..ce3589e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -22,6 +22,10 @@ builds: dockers: - image_templates: [ "docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-amd64" ] dockerfile: Dockerfile + extra_files: + - LICENSE + - README.md + - conf/* use: buildx build_flag_templates: - --platform=linux/amd64 @@ -36,6 +40,10 @@ dockers: - image_templates: [ "docker.io/engigu/{{ .Env.DOCKER_IMAGE_NAME }}:{{ .Version }}-arm64v8" ] goarch: arm64 dockerfile: Dockerfile + extra_files: + - LICENSE + - README.md + - conf/* use: buildx build_flag_templates: - --platform=linux/arm64/v8