mirror of
https://github.com/grassrootseconomics/cic-chain-events.git
synced 2024-11-16 04:56:46 +01:00
Mohammed Sohail
df88d9df16
* update config to better defaults * add docs, inline and md * add context support throughout * replace json with goccy/go-json for better decoding of large JSON * update graphql fetcher: replace ioutil with io * test runner script (until CI is ready) * update CI build config
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: goreleaser/goreleaser-cross
|
|
environment: build
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.19.3
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v2
|
|
with:
|
|
version: latest
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
build-publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: docker/login-action@v1.14.1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: docker compose build push
|
|
env:
|
|
DOCKER_BUILDKIT: 1
|
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
run: |
|
|
export TAG=$GITHUB_REF_NAME
|
|
docker-compose -f docker-compose.build.yaml build --progress plain
|
|
docker-compose -f docker-compose.build.yaml push
|
|
export TAG=latest
|
|
docker-compose -f docker-compose.build.yaml build --progress plain
|
|
docker-compose -f docker-compose.build.yaml push
|
|
|