Skip to content

Merge branch 'develop' #3

Merge branch 'develop'

Merge branch 'develop' #3

Workflow file for this run

name: Release
on:
push:
tags:
- "v20*"
permissions:
contents: write
packages: write
env:
IMAGE_NAME: asciinema-server
jobs:
publish:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up outputs
id: vars
run: |
VERSION=$(echo "${{ github.ref_name }}" | sed -e 's/^v//')
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
IMAGE_TAG=$VERSION
echo VERSION=$VERSION >> $GITHUB_OUTPUT
echo IMAGE_ID=$IMAGE_ID >> $GITHUB_OUTPUT
echo IMAGE_TAG=$IMAGE_TAG >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.vars.outputs.IMAGE_ID }}:${{ steps.vars.outputs.IMAGE_TAG }},${{ steps.vars.outputs.IMAGE_ID }}:latest
labels: runnumber=${{ github.run_id }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
build-args: |
VERSION=${{ steps.vars.outputs.VERSION }}
- name: Create the release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --draft --verify-tag --title ${{ steps.vars.outputs.VERSION }}