Skip to content

Deploy Images to GHCR #441

Deploy Images to GHCR

Deploy Images to GHCR #441

Workflow file for this run

name: Deploy Images to GHCR
env:
IMAGE_NAME: ghcr.io/justereseau/ombi
on:
workflow_dispatch:
schedule:
- cron: "45 6 * * *"
push:
branches:
- main
paths-ignore:
- README.md
- LICENSE
jobs:
push-store-image:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub Action
uses: actions/checkout@main
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Read latest Ombi pre-release
id: get_latest_release
run: echo "release_tag=$(curl https://api.github.com/repos/Ombi-app/Ombi/releases --silent | jq -r '[.[] | select(.draft == false and .prerelease == true)] | sort_by(.created_at) | reverse | .[0] | .tag_name | sub("v"; "")')" >> "$GITHUB_OUTPUT"
shell: bash
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
build-args: |
RELEASE_TAG=${{ steps.get_latest_release.outputs.release_tag }}
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ steps.get_latest_release.outputs.release_tag }}