Skip to content

Commit

Permalink
chore(ci): bring workflows from main to release branch (#1840)
Browse files Browse the repository at this point in the history
## Problem

We want workflows on main and release branch to be in harmony. This is
especially required for CD.

## Solution

Pull in recent changes from main.
  • Loading branch information
joshua-goldstein authored and mangalaman93 committed Feb 14, 2023
1 parent b537325 commit 5059df3
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 6 deletions.
45 changes: 43 additions & 2 deletions .github/workflows/cd-badger.yml
@@ -1,8 +1,8 @@
name: cd-badger
on: workflow_dispatch
jobs:
badger-build:
runs-on: ubuntu-latest
badger-build-amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Go Version
Expand Down Expand Up @@ -42,3 +42,44 @@ jobs:
path: |
badger/badger-checksum-linux-amd64.sha256
badger/badger-linux-amd64.tar.gz
badger-build-arm64:
runs-on: [self-hosted, ARM64]
steps:
- uses: actions/checkout@v3
- name: Get Go Version
run: |
#!/bin/bash
GOVERSION=$({ [ -f .go-version ] && cat .go-version; })
echo "GOVERSION=$GOVERSION" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GOVERSION }}
- name: Set Badger Release Version
run: |
#!/bin/bash
GIT_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [[ "$GIT_BRANCH_NAME" == "release/v"* ]];
then
echo "this is a release branch"
else
echo "this is NOT a release branch"
exit 1
fi
BADGER_RELEASE_VERSION=$(git rev-parse --abbrev-ref HEAD | sed 's/release\///')
echo "making a new release for "$BADGER_RELEASE_VERSION
echo "BADGER_RELEASE_VERSION=$BADGER_RELEASE_VERSION" >> $GITHUB_ENV
- name: Fetch dependencies
run: sudo apt-get -y install build-essential
- name: Build badger linux/arm64
run: make badger
- name: Generate SHA for Linux Build
run: cd badger && sha256sum badger-linux-arm64 | cut -c-64 > badger-checksum-linux-arm64.sha256
- name: Tar Archive for Linux Build
run: cd badger && tar -zcvf badger-linux-arm64.tar.gz badger-linux-arm64
- name: Upload Badger Binary Build Artifacts
uses: actions/upload-artifact@v3
with:
path: |
badger/badger-checksum-linux-arm64.sha256
badger/badger-linux-arm64.tar.gz
2 changes: 1 addition & 1 deletion .github/workflows/ci-badger-bank-tests-nightly.yml
Expand Up @@ -8,7 +8,7 @@ on:
- cron: "0 3 * * *"
jobs:
badger-bank:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Go Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-badger-bank-tests.yml
Expand Up @@ -12,7 +12,7 @@ on:
- cron: "*/30 * * * *"
jobs:
badger-bank:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Go Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-badger-tests.yml
Expand Up @@ -12,7 +12,7 @@ on:
- cron: "*/30 * * * *"
jobs:
badger-tests:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Go Version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-golang-lint.yml
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
go-lint:
name: lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get Go Version
Expand Down

0 comments on commit 5059df3

Please sign in to comment.