Skip to content

release-after

release-after #1

Workflow file for this run

name: release-after
on:
workflow_call:
inputs:
plan:
required: true
type: string
workflow_dispatch:
inputs:
plan:
description: plan json (eg {"releases":[{"app_version":"0.2.1"}]}) to extract version
required: true
type: string
jobs:
container-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- id: version
shell: bash
run: |
cat >plan.json << EOF
${{ inputs.plan }}
EOF
VERSION=$(yq -r '.releases[0].app_version' < plan.json)
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v6
with:
push: true
build-args: VERSION=${{ steps.version.outputs.VERSION }}
platforms: linux/amd64,linux/arm64
target: cdviz-collector
tags: ghcr.io/cdviz-dev/cdviz-collector:${{ steps.version.outputs.VERSION }}
# cache-from: type=gha
# cache-to: type=gha,mode=max