Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
name: Build and Release Docker Images on GHCR
on:
release:
types: [created]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: "1.21.0"
check-latest: true
- uses: actions/checkout@v2
- name: Prepare Release Variables
id: vars
uses: ignite/cli/actions/release/vars@main
- name: build head
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin
docker build . --tag ghcr.io/${{ github.repository }}_head:${{ steps.vars.outputs.tag_name }} --build-arg "GH_TOKEN=${{ secrets.GHCR_TOKEN }}" --build-arg="BLS_EXTENSION_VER=dev.3" -f docker/Dockerfile_head
docker push ghcr.io/${{ github.repository }}_head:${{ steps.vars.outputs.tag_name }}
- name: build worker
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin
docker build . --tag ghcr.io/${{ github.repository }}_worker:${{ steps.vars.outputs.tag_name }} --build-arg "GH_TOKEN=${{ secrets.GHCR_TOKEN }}" --build-arg="BLS_EXTENSION_VER=dev.3" -f docker/Dockerfile_worker
docker push ghcr.io/${{ github.repository }}_worker:${{ steps.vars.outputs.tag_name }}