Skip to content

updated more actions #65

updated more actions

updated more actions #65

name: Publish image
on:
push:
tags:
- '*'
jobs:
build-and-publish-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Extract Git Tag
run: echo "GIT_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build the twitch-recorder Docker image
env:
IMAGE_TAG: ${{ env.GIT_TAG }}
run: |
docker build . --tag ghcr.io/jawee/twitch-recorder:latest --tag ghcr.io/jawee/twitch-recorder:$IMAGE_TAG
docker push ghcr.io/jawee/twitch-recorder:latest
docker push ghcr.io/jawee/twitch-recorder:$IMAGE_TAG