mirror of
https://github.com/grassrootseconomics/farmstar-survey-backend.git
synced 2025-04-08 06:01:01 +02:00
ci: remove goreleaser
This commit is contained in:
parent
7ace9923b9
commit
a6ff999a80
54
.github/workflows/release.yaml
vendored
54
.github/workflows/release.yaml
vendored
@ -35,66 +35,16 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set outputs
|
|
||||||
run: |
|
|
||||||
echo "RELEASE_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV \
|
|
||||||
&& echo "RELEASE_SHORT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push image
|
- name: Build and push image
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: ./
|
context: ./
|
||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
|
||||||
BUILD_COMMIT=${{ env.RELEASE_SHORT_COMMIT }}
|
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
tags: |
|
tags: |
|
||||||
ghcr.io/grassrootseconomics/farmstar-survey-backend/farmstar-survey-backend:latest
|
ghcr.io/grassrootseconomics/farmstar-survey-backend/farmstar-survey-backend:latest
|
||||||
ghcr.io/grassrootseconomics/farmstar-survey-backend/farmstar-survey-backend:${{ env.RELEASE_TAG }}
|
ghcr.io/grassrootseconomics/farmstar-survey-backend/farmstar-survey-backend:${{ env.RELEASE_TAG }}
|
||||||
|
|
||||||
goreleaser:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: goreleaser/goreleaser-cross
|
|
||||||
environment: build
|
|
||||||
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/go/pkg/mod
|
|
||||||
~/.cache/go-build
|
|
||||||
~/Library/Caches/go-build
|
|
||||||
%LocalAppData%\go-build
|
|
||||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-go-
|
|
||||||
|
|
||||||
- name: Workaround Git Security Warning
|
|
||||||
run: |
|
|
||||||
# Workaround a bug in github actions:
|
|
||||||
# https://github.com/actions/runner-images/issues/6775.
|
|
||||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
|
||||||
with:
|
|
||||||
go-version: 'stable'
|
|
||||||
|
|
||||||
- name: Run GoReleaser
|
|
||||||
uses: goreleaser/goreleaser-action@v2
|
|
||||||
with:
|
|
||||||
version: latest
|
|
||||||
args: release --rm-dist
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
17
.goreleaser
17
.goreleaser
@ -1,17 +0,0 @@
|
|||||||
builds:
|
|
||||||
- id: linux-amd64
|
|
||||||
env:
|
|
||||||
- CGO_ENABLED=0
|
|
||||||
goos:
|
|
||||||
- linux
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
main: ./cmd/farmstar
|
|
||||||
ldflags:
|
|
||||||
- -s -w
|
|
||||||
|
|
||||||
archives:
|
|
||||||
- format: tar.gz
|
|
||||||
files:
|
|
||||||
- LICENSE
|
|
||||||
- config.toml
|
|
Loading…
Reference in New Issue
Block a user