Skip to content

Brew formula update for aiden-runner version v0.1.36 #15

Brew formula update for aiden-runner version v0.1.36

Brew formula update for aiden-runner version v0.1.36 #15

Workflow file for this run

# a pipeline to create container image on changes to aiden-runner.rb file
name: aiden-runner
on:
push:
branches:
- main
paths:
- 'aiden-runner.rb'
- aiden-runner/Dockerfile
- .github/workflows/aiden-runner.yaml
env:
REGISTRY: ghcr.io
IMAGE_NAME: stackgenhq/aiden-runner
jobs:
build:
outputs:
image_tag: ${{ steps.meta.outputs.tags }}
version: ${{ steps.version.outputs.VERSION }}
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-latest
tag-suffix: -amd64
- platform: linux/arm64
runner: ubuntu-22.04-arm
tag-suffix: -arm64
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
sparse-checkout: |
aiden-runner
aiden-runner.rb
- name: Get aiden-runner version
id: version
run: |
VERSION="$(awk '$1 == "version" { print $2; exit }' aiden-runner.rb | tr -d '"')"
test -n "$VERSION" || { echo "Error: Failed to extract version from aiden-runner.rb"; exit 1; }
echo "$VERSION" | grep -Eq '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?(\+[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$' || { echo "Error: Extracted version is not valid semver: $VERSION"; exit 1; }
echo "VERSION=$VERSION" >> "$GITHUB_OUTPUT"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=${{ steps.version.outputs.VERSION }}
type=raw,value=latest
flavor: |
suffix=${{ matrix.tag-suffix }},onlatest=false
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker Build and push
uses: docker/build-push-action@v6
with:
context: ./aiden-runner
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}
push: true
provenance: false
labels: ${{ steps.meta.outputs.labels }}
build-args: |-
AIDEN_RUNNER_VERSION=${{ steps.version.outputs.VERSION }}
create_manifest:
name: Create manifest
runs-on: ubuntu-22.04
needs: build
permissions:
contents: read
packages: write
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create manifest
run: |
docker buildx imagetools create \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest-arm64
docker buildx imagetools create \
-t ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build.outputs.version }} \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build.outputs.version }}-amd64 \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build.outputs.version }}-arm64