Skip to content

Commit d5b16e1

Browse files
authored
fixed lint on main + use env VERSION for docker image versioning (#7)
Signed-off-by: pco <pasquale.convertini@ibm.com>
1 parent ca126bb commit d5b16e1

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/build-image.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
with:
3131
username: ${{ secrets.DOCKERHUB_USERNAME }}
3232
password: ${{ secrets.DOCKERHUB_TOKEN }}
33+
- name: Extract version from tag
34+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
3335
- name: Build and Push Multi-Platform Docker Image
3436
uses: docker/build-push-action@v6
3537
with:
@@ -38,7 +40,7 @@ jobs:
3840
platforms: linux/amd64,linux/arm64,linux/s390x
3941
push: true
4042
build-args: |
41-
FABRIC_X_VERSION=${GITHUB_REF#refs/tags/v}
43+
FABRIC_X_VERSION=${{ env.VERSION }}
4244
tags: |
43-
docker.io/hyperledger/fabric-x-tools:${GITHUB_REF#refs/tags/v}
45+
docker.io/hyperledger/fabric-x-tools:${{ env.VERSION }}
4446
docker.io/hyperledger/fabric-x-tools:latest

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest
2929
- name: Run lint
3030
run: |
31-
git fetch origin main:main
31+
git fetch origin main:refs/remotes/origin/main
3232
make lint

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ clean: ## Cleans the build area
6262
-@rm -rf $(BUILD_DIR)
6363

6464
# Run lint
65-
# TODO: fix existing lint issues (to find them, remove --new-from-rev=main option)
65+
# TODO: fix existing lint issues (to find them, remove --new-from-rev=origin/main option)
6666
.PHONY: lint
6767
lint: FORCE
6868
@echo "Running Go Linters..."
69-
cd tools && golangci-lint run --new-from-rev=main --color=always --max-same-issues 0
69+
cd tools && golangci-lint run --new-from-rev=origin/main --color=always --max-same-issues 0
7070
@echo "Running License Header Linters..."
7171
scripts/license-lint.sh
7272

0 commit comments

Comments
 (0)