forked from hyperledger-labs/fabric-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix builds for non main branches (hyperledger-labs#130)
hyperledger-labs#114 This PR fixes the release builds to push the operator, also addresses the integration test and all the checks required.. --------- Signed-off-by: asararatnakar <[email protected]> Signed-off-by: Shoaeb Jindani <[email protected]>
- Loading branch information
1 parent
9979424
commit 484d7bb
Showing
11 changed files
with
107 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Build Operator image | |
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
branches: [v1.*] | ||
|
||
jobs: | ||
image: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: Build Operator image | |
|
||
on: | ||
push: | ||
branches: [main] | ||
branches: [v1.*] | ||
|
||
jobs: | ||
image: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Release Operator | ||
|
||
on: | ||
# pull_request: | ||
# branches: [v1.*] | ||
push: | ||
tags: [v1.0.6-*] | ||
|
||
env: | ||
GO_VER: 1.18 | ||
GO_TAGS: "" | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
SEMREV_LABEL: ${{ github.ref_name }} | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build-and-push-image: | ||
runs-on: ubuntu-20.04 | ||
|
||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
with: | ||
buildkitd-flags: --debug | ||
config-inline: | | ||
[worker.oci] | ||
max-parallelism = 1 | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to the GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
type=semver,pattern={{major}}.{{minor}}.{{patch}} | ||
- name: Build and push | ||
id: push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
tags: ${{ steps.meta.outputs.tags }} | ||
push: ${{ github.event_name != 'pull_request' }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
build-args: | | ||
GO_VER=${{ env.GO_VER }} | ||
GO_TAGS=${{ env.GO_TAGS }} | ||
BUILD_ID=${{ env.SEMREV_LABEL }} | ||
BUILD_DATE=${{ env.BUILD_DATE }} | ||
create-release: | ||
name: Create GitHub Release | ||
needs: [ build-and-push-image ] | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Release Operator Version | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: "true" | ||
bodyFile: release_notes/${{ env.SEMREV_LABEL }}.md | ||
tag: ${{ env.SEMREV_LABEL }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module github.com/IBM-Blockchain/fabric-operator | ||
|
||
go 1.20 | ||
go 1.18 | ||
|
||
require ( | ||
github.com/cloudflare/cfssl v1.4.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters