Skip to content

Rebuild tool

Rebuild tool #23

Workflow file for this run

name: Rebuild tool
on:
workflow_dispatch:
inputs:
tool:
description: 'Space separated list of tools to rebuild'
required: true
jobs:
prepare:
runs-on: ubuntu-22.04
if: ${{ inputs.tool != '[]' && inputs.tool != '' }}
outputs:
tools: ${{ steps.prepare.outputs.tools }}
steps:
- name: Prepare tools
id: prepare
env:
REBUILD_TOOLS: ${{ inputs.tool }}
run: |
echo "### Tools to rebuild: ${REBUILD_TOOLS}."
REBUILD_TOOLS_JSON="$(
echo -n "${REBUILD_TOOLS}" \
| tr ' ' '\n' \
| jq --raw-input '.' | jq --slurp --compact-output '.'
)"
echo " JSON: ${REBUILD_TOOLS_JSON}"
echo "tools=${REBUILD_TOOLS_JSON}" >>"${GITHUB_OUTPUT}"
rebuild:
runs-on: ubuntu-22.04
needs:
- prepare
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
tool: ${{ fromJSON(needs.prepare.outputs.tools) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install uniget
uses: uniget-org/uniget-action@v1
with:
prefix: helper
tools: gojq regclient
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: uniget-bot
password: ${{ secrets.GITHUB_TOKEN }}
- name: Rebuild
run: |
set -o errexit
make ${{ matrix.tool }}--push ${{ matrix.tool }}--promote
- name: Store logs
uses: actions/upload-artifact@v3
if: always()
with:
name: logs.zip
path: "**/build.log"