Skip to content

chore: fix python version #2

chore: fix python version

chore: fix python version #2

Workflow file for this run

name: 🚀 Publish
on:
push:
tags:
- 'gemma-wrapper-v*'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write # Required for creating the GitHub release
packages: write # Required for pushing to GitHub Container Registry
steps:
- name: ⬇️ Check out code
uses: actions/checkout@v3
- name: Version
id: version
run: |
if [[ $GITHUB_REF == refs/tags/* ]]
then
tag=${GITHUB_REF##refs/tags/}
v=${tag##gemma-wrapper-}
echo "::set-output name=version::$v"
else
echo "::set-output name=version::$GITHUB_SHA"
fi
- uses: actions/setup-python@v5
name: Setup python version
with:
python-version: '3.11'
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Gemma Wrapper ${{ steps.version.outputs.version }}
draft: false
prerelease: false
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }} # `PAT` is a secret that contains your Personal Access Token with `write:packages` scope
- name: Build and push image
id: build-and-push
uses: docker/[email protected]
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64/v8
push: true
tags: |
ghcr.io/biznesbees/gemma-wrapper:${{ steps.version.outputs.version }}