Skip to content

v1.15.3

v1.15.3 #53

Workflow file for this run

name: Release 🚀
on:
release:
types:
- created
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GO_VERSION: "1.21"
NODE_VERSION: "20.7.0"
jobs:
build:
name: Build binaries
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: |
web/package-lock.json
- name: Build
run: |
pushd web; npm ci; popd
gobuild() {
if [[ "$1" == "windows" ]]; then
ext=".exe"
fi
env GOOS="$1" GOARCH="$2" go build -o bin/bf_"$1_$2$ext" ./cmd/bf
env GOOS="$1" GOARCH="$2" go build -o bin/bfid_"$1_$2$ext" \
./cmd/bfid
}
go generate -x ./...
mkdir bin
gobuild linux amd64
gobuild linux arm64
gobuild darwin amd64
gobuild darwin arm64
gobuild windows amd64
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: bifrost
path: |
bin/*
docs/issuer-openapi.yml
- name: Update Github release
uses: softprops/action-gh-release@v1
with:
append_body: true
generate_release_notes: true
files: |
bin/*
docs/issuer-openapi.yml
container_images:
name: Push contaimer images
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build bifrost image
uses: redhat-actions/buildah-build@v2
id: build_bf
with:
build-args: |
GO_VERSION=${{ env.GO_VERSION }}
NODE_VERSION=${{ env.NODE_VERSION }}
image: ${{ github.repository }}
tags: >
${{ github.ref_name }}
${{ github.sha }}
latest
containerfiles: Containerfile
oci: true
archs: amd64, arm64
- name: Push bifrost image to ghcr.io
uses: redhat-actions/push-to-registry@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
image: ${{ steps.build_bf.outputs.image }}
tags: ${{ steps.build_bf.outputs.tags }}