Skip to content

Build CLI images

Build CLI images #2

Workflow file for this run

name: Build CLI images
env:
GITHUB_OUTPUT: ""
on:
workflow_dispatch:
inputs:
version:
description: 'Version (maj.min.patch)'
required: true
jobs:
psinode-cli-builder:
name: psinode-cli-builder
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/psinode"
TAGS="${IMAGE}:${{ github.sha }},${IMAGE}:${{ github.event.inputs.version }}"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Image
uses: docker/build-push-action@v4
with:
context: .
push: true
no-cache: true
pull: true
file: docker/psinode.Dockerfile
tags: ${{ steps.prep.outputs.tags }}
psibase-cli-builder:
name: psibase-cli-builder
runs-on: ubuntu-latest
needs: psinode-cli-builder
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: false
fetch-depth: 0
- name: Preparation
id: prep
run: |
REGISTRY="ghcr.io"
IMAGE="${REGISTRY}/${{ github.repository_owner }}/psibase"
TAGS="${IMAGE}:${{ github.sha }},${IMAGE}:${{ github.event.inputs.version }}"
echo "tags=${TAGS,,}" >> $GITHUB_OUTPUT
- name: Showtag
id: showtag
run: echo ${{ steps.prep.outputs.tags }}
- name: Docker Buildx setup
uses: docker/setup-buildx-action@v2
with:
buildkitd-flags: --debug
- name: Login in to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Publish Image
uses: docker/build-push-action@v4
with:
build-args: |
psinode_version=${{ github.event.inputs.version }}
context: .
push: true
no-cache: true
pull: true
file: docker/psibase.Dockerfile
tags: ${{ steps.prep.outputs.tags }}