Skip to content

Fix Docker tags

Fix Docker tags #10

Workflow file for this run

name: Make release
env:
UBUNTU_VERSION: "latest"
on:
push:
tags:
- v*
jobs:
push-store-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "."
steps:
- name: "Checkout GitHub Action"
uses: actions/checkout@main
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Get Docker Tag
id: docker-tag
run: |
if echo "${{ github.ref_name }}" | grep -q alpha; then \
echo "docker-tag=alpha" >> $GITHUB_OUTPUT; \
elif echo "${{ github.ref_name }}" | grep -q beta; then \
echo "docker-tag=beta" >> $GITHUB_OUTPUT; \
else echo "docker-tag=latest" >> $GITHUB_OUTPUT; fi;
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/timeleaplabs/py-unchained-ai:${{ steps.docker-tag.outputs.docker-tag }}
ghcr.io/timeleaplabs/py-unchained-ai:${{ github.ref_name }}