invidious-with-companion/.forgejo/workflows/ci.yml

64 lines
1.7 KiB
YAML
Raw Permalink Normal View History

2024-04-27 18:25:22 -04:00
name: 'Invidious CI'
on:
# workflow_dispatch:
# inputs: {}
schedule:
- cron: '0 7 * * 0'
push:
branches:
- "master"
- "experimental"
- "experimental2"
2024-04-27 18:25:22 -04:00
jobs:
build:
runs-on: runner
2024-12-09 16:57:28 -03:00
2024-04-27 18:25:22 -04:00
steps:
2024-12-09 16:57:28 -03:00
- uses: https://code.forgejo.org/actions/checkout@v4
- name: Set up cache
uses: https://code.forgejo.org/actions/cache@v3
id: ccache-restore
with:
path: |
./lib
key: ${{ runner.os }}-invidious-${{ github.sha }}
restore-keys: |
${{ runner.os }}-invidious-
- name: Create cache directory
if: steps.ccache-restore.outputs.cache-hit != 'true'
run: mkdir -p ./lib
2024-04-27 18:25:22 -04:00
- uses: https://code.forgejo.org/docker/setup-buildx-action@v3
name: Setup Docker BuildX system
- name: Login to Docker Container Registry
uses: https://code.forgejo.org/docker/login-action@v3.1.0
with:
registry: git.nadeko.net
username: ${{ secrets.USERNAME }}
password: ${{ secrets.TOKEN }}
- name: Docker meta
id: meta
uses: https://github.com/docker/metadata-action@v5
with:
2024-12-09 16:57:28 -03:00
images: git.nadeko.net/fijxu/invidious-with-companion
tags: |
type=sha,format=short,prefix={{date 'YYYY.MM.DD'}}-,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
2024-11-05 00:11:10 -03:00
- uses: https://code.forgejo.org/docker/build-push-action@v6
2024-04-27 18:25:22 -04:00
name: Build images
with:
context: .
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
2024-04-27 18:25:22 -04:00
platforms: linux/amd64
push: true
build-args: |
"release=1"