Merge pull request #2608 from nspcc-dev/workflow-related-corrections

Workflow-related corrections
This commit is contained in:
Roman Khimov 2022-07-21 19:37:32 +03:00 committed by GitHub
commit 30de3d60cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 5 deletions

View file

@ -93,6 +93,7 @@ jobs:
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }}
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
@ -110,10 +111,11 @@ jobs:
- name: Build and push - name: Build and push
uses: docker/build-push-action@v3 uses: docker/build-push-action@v3
with: with:
context: .
push: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }} push: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }}
platforms: linux/amd64,linux/arm64 platforms: linux/amd64,linux/arm64
build-args: | build-args: |
REPO=${{ steps.setvars.outputs.repo }} REPO=github.com/${{ github.repository }}
VERSION=${{ steps.setvars.outputs.version }} VERSION=${{ steps.setvars.outputs.version }}
tags: ${{ steps.setvars.outputs.repo }}:${{ steps.setvars.outputs.version }}${{ steps.setvars.outputs.suffix }}${{ steps.setlatest.outputs.latest }} tags: ${{ steps.setvars.outputs.repo }}:${{ steps.setvars.outputs.version }}${{ steps.setvars.outputs.suffix }}${{ steps.setlatest.outputs.latest }}
@ -136,6 +138,7 @@ jobs:
cache: true cache: true
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }}
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}

View file

@ -16,12 +16,12 @@ WORKDIR /neo-go
ARG REPO=repository ARG REPO=repository
ARG VERSION=dev ARG VERSION=dev
RUN make build RUN VERSION=$VERSION REPO=$REPO make build
# Executable image # Executable image
FROM alpine FROM alpine
ARG VERSION ARG VERSION=dev
LABEL version=$VERSION LABEL version=$VERSION
WORKDIR / WORKDIR /

View file

@ -98,7 +98,7 @@ version:
gh-docker-vars: gh-docker-vars:
@echo "::set-output name=file::$(D_FILE)" @echo "::set-output name=file::$(D_FILE)"
@echo "::set-output name=version::$(VERSION)" @echo "::set-output name=version::$(VERSION)"
@echo "::set-output name=repo::$(REPO)" @echo "::set-output name=repo::$(IMAGE_REPO)"
@echo "::set-output name=suffix::$(IMAGE_SUFFIX)" @echo "::set-output name=suffix::$(IMAGE_SUFFIX)"
test: test:

View file

@ -10,7 +10,6 @@
[![codecov](https://codecov.io/gh/nspcc-dev/neo-go/branch/master/graph/badge.svg)](https://codecov.io/gh/nspcc-dev/neo-go) [![codecov](https://codecov.io/gh/nspcc-dev/neo-go/branch/master/graph/badge.svg)](https://codecov.io/gh/nspcc-dev/neo-go)
[![CircleCI](https://circleci.com/gh/nspcc-dev/neo-go/tree/master.svg?style=shield)](https://circleci.com/gh/nspcc-dev/neo-go/tree/master) [![CircleCI](https://circleci.com/gh/nspcc-dev/neo-go/tree/master.svg?style=shield)](https://circleci.com/gh/nspcc-dev/neo-go/tree/master)
[![GithubWorkflows Tests](https://github.com/nspcc-dev/neo-go/actions/workflows/run_tests.yml/badge.svg)](https://github.com/nspcc-dev/neo-go/actions/workflows/run_tests.yml) [![GithubWorkflows Tests](https://github.com/nspcc-dev/neo-go/actions/workflows/run_tests.yml/badge.svg)](https://github.com/nspcc-dev/neo-go/actions/workflows/run_tests.yml)
[![GithubWorkflows CodeQL](https://github.com/nspcc-dev/neo-go/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/nspcc-dev/neo-go/actions/workflows/codeql-analysis.yml)
[![Report](https://goreportcard.com/badge/github.com/nspcc-dev/neo-go)](https://goreportcard.com/report/github.com/nspcc-dev/neo-go) [![Report](https://goreportcard.com/badge/github.com/nspcc-dev/neo-go)](https://goreportcard.com/report/github.com/nspcc-dev/neo-go)
[![GoDoc](https://godoc.org/github.com/nspcc-dev/neo-go?status.svg)](https://godoc.org/github.com/nspcc-dev/neo-go) [![GoDoc](https://godoc.org/github.com/nspcc-dev/neo-go?status.svg)](https://godoc.org/github.com/nspcc-dev/neo-go)
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nspcc-dev/neo-go?sort=semver) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/nspcc-dev/neo-go?sort=semver)