test release ()

This commit is contained in:
Alex Sharov 2023-02-08 16:31:32 +07:00 committed by GitHub
parent a75a948beb
commit 7806324c4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 55 additions and 16 deletions

View File

@ -64,7 +64,7 @@ jobs:
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v3
with:
version: v1.50
version: v1.51
- name: Test
run: make test

View File

@ -6,7 +6,7 @@ on:
jobs:
coverage:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

View File

@ -20,28 +20,38 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@master
- name: dockerhub-login
uses: docker/login-action@v2
with:
go-version: 1.18.x
username: ${{ secrets.DOCKERHUB }}
password: ${{ secrets.DOCKERHUB_KEY }}
- name: ghcr-login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
- name: Run GoReleaser
run: |
make release
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}
DOCKER_USERNAME: ${{ secrets.DOCKERHUB }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_KEY }}

View File

@ -11,9 +11,9 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v7
with: # core team are exempt
exempt-issue-assignees: 'AskAlexSharov,realLedgerwatch,AndreaLanfranchi,yperbasis,vorot93,b00ris,JekaMas,mandrigin,Giulio2002,tjayrush,revitteth,hexoscott'
exempt-issue-assignees: 'AskAlexSharov,realLedgerwatch,AndreaLanfranchi,yperbasis,vorot93,b00ris,JekaMas,mandrigin,Giulio2002,tjayrush,revitteth,hexoscott'
exempt-pr-assignees: 'AskAlexSharov,realLedgerwatch,AndreaLanfranchi,yperbasis,vorot93,b00ris,JekaMas,mandrigin,Giulio2002,tjayrush,revitteth,hexoscott'
stale-issue-message: 'This issue is stale because it has been open for 40 days with no activity. Remove stale label or comment, or this will be closed in 7 days.'
stale-pr-message: 'This PR is stale because it has been open for 40 days with no activity.'

View File

@ -14,6 +14,8 @@ builds:
goarch:
- amd64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/amd64
- PKG_CONFIG_PATH=/sysroot/macos/amd64/usr/local/lib/pkgconfig
- CC=o64-clang
- CXX=o64-clang++
tags:
@ -29,6 +31,8 @@ builds:
goarch:
- arm64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/macos/arm64
- PKG_CONFIG_PATH=/sysroot/macos/arm64/usr/local/lib/pkgconfig
- CC=oa64-clang
- CXX=oa64-clang++
tags:
@ -44,6 +48,8 @@ builds:
goarch:
- amd64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/amd64
- PKG_CONFIG_PATH=/sysroot/linux/amd64/usr/local/lib/pkgconfig
- CC=gcc
- CXX=g++
tags:
@ -60,6 +66,8 @@ builds:
goarch:
- arm64
env:
- PKG_CONFIG_SYSROOT_DIR=/sysroot/linux/aarch64
- PKG_CONFIG_PATH=/sysroot/linux/aarch64/usr/local/lib/pkgconfig
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
tags:
@ -74,8 +82,10 @@ snapshot:
dockers:
- image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
skip_push: true
goarch: amd64
ids:
- linux-amd64
@ -84,7 +94,9 @@ dockers:
- image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
skip_push: true
use: buildx
goarch: arm64
ids:
@ -94,14 +106,28 @@ dockers:
docker_manifests:
- name_template: thorax/{{ .ProjectName }}:{{ .Version }}
skip_push: true
image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64
- name_template: thorax/{{ .ProjectName }}:latest
- name_template: ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}
skip_push: true
image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64
- name_template: thorax/{{ .ProjectName }}:latest
skip_push: true
image_templates:
- thorax/{{ .ProjectName }}:{{ .Version }}-amd64
- thorax/{{ .ProjectName }}:{{ .Version }}-arm64
- name_template: ghcr.io/ledgerwatch/{{ .ProjectName }}:latest
skip_push: true
image_templates:
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-amd64
- ghcr.io/ledgerwatch/{{ .ProjectName }}:{{ .Version }}-arm64
announce:
slack:

View File

@ -166,7 +166,7 @@ lintci:
## lintci-deps: (re)installs golangci-lint to build/bin/golangci-lint
lintci-deps:
rm -f ./build/bin/golangci-lint
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.50.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./build/bin v1.51.1
## clean: cleans the go cache, build dir, libmdbx db dir
clean:
@ -246,6 +246,9 @@ release: git-submodules
goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate
@docker image push --all-tags thorax/erigon
@docker image push --all-tags ghcr.io/ledgerwatch/erigon
# since DOCKER_UID, DOCKER_GID are default initialized to the current user uid/gid,
# we need separate envvars to facilitate creation of the erigon user on the host OS.
ERIGON_USER_UID ?= 3473