Skip to content

Publish

Publish #10

name: "Publish"
on:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
strategy:
matrix:
arch: ["aarch64", "amd64"]
steps:
- name: Checkout the repository
uses: actions/checkout@v6
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get BUILD_VERSION
run: echo "$(grep "ARG BUILD_VERSION=" docker/Dockerfile | cut -d' ' -f2 | tr -d '"')" >> $GITHUB_ENV
- name: Build and publish
uses: docker/build-push-action@master
with:
context: docker
push: true
tags: ghcr.io/hanwg/telegram-bot-api:${{ env.BUILD_VERSION }}
build-args: BUILD_ARCH=${{ matrix.arch }},BUILD_FROM=ghcr.io/home-assistant/${{ matrix.arch }}-base