Skip to content

Commit

Permalink
build: Backport workflow and other fixes to release/0.6.x branch [DEV…
Browse files Browse the repository at this point in the history
…-1822] (#410)

* feat(installer): Get installer to handle multi-platform binaries [DEV-1667] (#376)
* Add support for determining the correct Github Release asset based on OS type and architecture
* Set recommended Docker image version

Signed-off-by: Andrew Nikitin <[email protected]>
Co-authored-by: Andrew Nikitin <[email protected]>

* fix(release): Bump semantic release package (#377)
Bump semantic release

* ci: Add v0.6.x release branch (#378)
Update .releaserc.json

* chore(deps-dev): Bump semantic-release from 19.0.4 to 19.0.5 (#383)
Bumps [semantic-release](https://github.com/semantic-release/semantic-release) from 19.0.4 to 19.0.5.
- [Release notes](https://github.com/semantic-release/semantic-release/releases)
- [Commits](semantic-release/semantic-release@v19.0.4...v19.0.5)

---
updated-dependencies:
- dependency-name: semantic-release
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump: Proto dependencies (#391)

* chore(deps): Bump bufbuild/buf-setup-action from 1.7.0 to 1.8.0 (#393)

Bumps [bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action) from 1.7.0 to 1.8.0.
- [Release notes](https://github.com/bufbuild/buf-setup-action/releases)
- [Commits](bufbuild/buf-setup-action@v1.7.0...v1.8.0)

---
updated-dependencies:
- dependency-name: bufbuild/buf-setup-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore: Fix installer template for rsyslog [DEV-1815] (#403)

* Remove Debian postinstall/purge scripts
* Fix rsyslog template

* ci: Sync workflow changes to main [DEV-1816] (#407)

* Fix localnet running
* Squashed commit of the following:
* Change dispatch dependencies
* Add persist credentials to CodeQL
* Update .releaserc.json
* Update package-lock.json
* Added Docker metadata step to build
* Add updated caching and tagging in release
* Update test.yml
* Cache go setup
* Deactivate junit action
* Update dispatch.yml
* Bump go mod
* Revert changes in sync
* Reset testify

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Andrew Nikitin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Kolesov <[email protected]>
Co-authored-by: abdulla-ashurov <[email protected]>
Co-authored-by: Andrew Nikitin <[email protected]>
  • Loading branch information
5 people committed Oct 16, 2022
1 parent e748357 commit a5cb640
Show file tree
Hide file tree
Showing 18 changed files with 505 additions and 706 deletions.
35 changes: 20 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- uses: actions/setup-go@v3
with:
Expand All @@ -35,23 +36,14 @@ jobs:
name: cheqd-noded
path: dist/**/cheqd-noded

- name: Run Golang unit tests
run: go test -v ./...

build-docker:
name: "Docker image"
runs-on: ubuntu-latest
env:
DOCKER_TEST_IMAGE: ${{ github.repository }}:${{ github.sha }}
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -60,6 +52,17 @@ jobs:
install: true
version: latest

- name: Configure Docker image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=raw,value=build-latest
type=sha,format=long
- name: Build image
uses: docker/build-push-action@v3
with:
Expand All @@ -68,11 +71,13 @@ jobs:
platforms: linux/amd64
load: true
target: runner
tags: ${{ env.DOCKER_TEST_IMAGE }}
outputs: type=docker,dest=/tmp/cheqd-node-image.tar
tags: ${{ steps.meta.outputs.tags }}
outputs: type=docker,dest=/tmp/cheqd-node-build.tar
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Upload Docker test image
- name: Upload Docker build image
uses: actions/upload-artifact@v3
with:
name: cheqd-node-image.tar
path: /tmp/cheqd-node-image.tar
name: cheqd-node-build.tar
path: /tmp/cheqd-node-build.tar
1 change: 1 addition & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- name: Build
run: make proto-gen build
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
# name: "Test"
# needs: call-build
# uses: ./.github/workflows/test.yml
# secrets: inherit

call-release:
name: "Release"
# needs: [call-test, call-build]
# needs: call-test
needs: call-build
if: ${{ github.ref_protected == true }}
uses: ./.github/workflows/release.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
with:
config-file: '.github/linters/mlc_config.json'
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'

go-lint:
# We can't use VALIDATE_GO from super linter because of this issue:
Expand All @@ -44,6 +43,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod
cache: true

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod
cache: true

# Node.js setup is needed to run Semantic Release
- uses: actions/setup-node@v3
Expand All @@ -35,7 +36,7 @@ jobs:
cache-dependency-path: '**/package-lock.json'

# Setup for pushing to Buf.build later
- uses: bufbuild/buf-setup-action@v1.7.0
- uses: bufbuild/buf-setup-action@v1.8.0

# Required for short-lived token provided to Semantic Release
- name: "Obtain Github App token"
Expand Down Expand Up @@ -78,17 +79,15 @@ jobs:
name: "Docker image"
needs: release-binary
runs-on: ubuntu-latest

env:
IMAGE_NAME: ${{ github.repository }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required to fetch version
persist-credentials: false

- uses: actions/setup-go@v3
with:
go-version-file: ./go.mod

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
id: buildx
Expand All @@ -111,6 +110,8 @@ jobs:
latest=auto
tags: |
type=semver,pattern={{version}},value=${{ needs.release-binary.outputs.RELEASE_VERSION }}
type=raw,value=production-latest
type=sha,format=long
labels: |
org.opencontainers.image.vendor="Cheqd Foundation Limited"
org.opencontainers.image.created={{date 'dddd, MMMM Do YYYY, h:mm:ss a'}}
Expand All @@ -125,3 +126,5 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
Loading

0 comments on commit a5cb640

Please sign in to comment.