Skip to content

Commit eab7f59

Browse files
GitHub Action Intial Draft
Signed-off-by: Muthu <muthu.sundaravadivel@in.ibm.com>
1 parent e4dd168 commit eab7f59

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

.github/workflows/image-build-pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: checks
5353
run: make checks
5454
- name: gosec
55-
run: make go-sec
55+
run: make gosec
5656
- name: build
5757
run: make image
5858

.github/workflows/image.build.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ jobs:
99
image:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
14-
- name: Build
15-
run: |
16-
scripts/install-tools.sh
17-
make image
12+
- uses: actions/checkout@v4
1813
- name: Push
1914
run: |
2015
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin
21-
make image-push image-push-latest
16+
make image image-push

Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ build:
4444
GOOS=$(GOOS) GOARCH=$(ARCH) go build -o build/chaincode-builder ./cmd/ibp-builder
4545
GOOS=$(GOOS) GOARCH=$(ARCH) go build -o build/chaincode-builder-client ./cmd/ibp-builder-client
4646

47-
image: login
47+
image: ## Builds a x86 based image
4848
@go mod vendor
4949
docker build --rm . -f Dockerfile $(BUILD_ARGS) -t $(IMAGE):$(TAG)-$(ARCH)
5050
docker tag $(IMAGE):$(TAG)-$(ARCH) $(IMAGE):latest-$(ARCH)
@@ -53,11 +53,7 @@ image-nologin:
5353
@go mod vendor
5454
docker build --rm . -f Dockerfile $(BUILD_ARGS) -t $(IMAGE):$(TAG)-$(ARCH)
5555
docker tag $(IMAGE):$(TAG)-$(ARCH) $(IMAGE):latest-$(ARCH)
56-
57-
login:
58-
echo $(DOCKER_PASSWORD) | docker login -u $(DOCKER_USERNAME) --password-stdin $(DOCKER_IMAGE_REPO)
59-
60-
image-push: login
56+
image-push:
6157
docker push $(IMAGE):$(TAG)-$(ARCH)
6258

6359
unit-tests:

0 commit comments

Comments
 (0)