Files
ADS-Bit/.github/workflows/release.yml
T
root babed47fe6 Release v1.1.2: publish container image + add security workflows
- Bump VERSION to 1.1.2 (no app behavior change from 1.1.1).
- release.yml: add workflow_dispatch so images can be published manually from
  the Actions tab in addition to on version tags.
- Add CodeQL code scanning (Python + JavaScript), free for public repos.
- Add Dependabot config for GitHub Actions and pip updates.

This is the first release to publish a multi-arch image to GHCR
(ghcr.io/allennpit/ads-bit).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 15:36:02 -07:00

60 lines
1.7 KiB
YAML

name: Release
# Build and publish a multi-arch image to GitHub Container Registry (GHCR)
# whenever a version tag is pushed (e.g. v1.1.2). Lets users run a prebuilt
# image — including on Raspberry Pi (arm64) — without building locally.
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
version:
description: "Image tag to publish (e.g. 1.1.2); leave blank for just :latest"
required: false
default: ""
permissions:
contents: read
packages: write
jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Compute lowercase image name
id: img
run: echo "name=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata (tags & labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ steps.img.outputs.name }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=${{ inputs.version }},enable=${{ github.event_name == 'workflow_dispatch' && inputs.version != '' }}
type=raw,value=latest
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}