Skip to content

Add CLI (#60)

Add CLI (#60) #3

Workflow file for this run

name: 'Releasing Image 🚀'
on:
push:
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
release_image:
name: 'Releasing Image 🐳'
strategy:
matrix:
config:
- { dockerfile: "Dockerfile", platforms: "linux/amd64,linux/arm64" }
runs-on: ubuntu-latest
steps:
- name: Check repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag Name
id: tag
shell: bash
run: |
echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Push Docker image
if: github.event_name != 'pull_request' && startsWith(github.ref, 'refs/tags/') && success()
uses: docker/build-push-action@v4
with:
context: .
push: true
platforms: ${{ matrix.config.platforms }}
tags: "ghcr.io/${{ secrets.NAMESPACE }}/${{ secrets.IMAGE_NAME }}:${{ env.TAG }}"
file: ${{ matrix.config.dockerfile }}