-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.17 KB
/
package-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy Images to GHCR
env:
IMAGE_NAME: ghcr.io/justereseau/jackett
on:
schedule:
- cron: '45 * * * *'
push:
branches:
- main
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.github/**'
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 Jackett release
id: get_latest_release
run: echo "jackett_release=$(curl https://api.github.com/repos/Jackett/Jackett/releases/latest --silent | jq -r '.tag_name')" >> "$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.jackett_release }}
tags: ${{ env.IMAGE_NAME }}:latest,${{ env.IMAGE_NAME }}:${{ steps.get_latest_release.outputs.jackett_release }}