summaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-nightly-container.yml13
-rw-r--r--.github/workflows/build-stable-container.yml21
-rw-r--r--.github/workflows/ci.yml49
-rw-r--r--.github/workflows/stale.yml13
4 files changed, 43 insertions, 53 deletions
diff --git a/.github/workflows/build-nightly-container.yml b/.github/workflows/build-nightly-container.yml
index bee27600..5ff3322f 100644
--- a/.github/workflows/build-nightly-container.yml
+++ b/.github/workflows/build-nightly-container.yml
@@ -23,19 +23,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- - name: Install Crystal
- uses: crystal-lang/install-crystal@v1.8.2
- with:
- crystal: 1.12.2
-
- - name: Run lint
- run: |
- if ! crystal tool format --check; then
- crystal tool format
- git diff
- exit 1
- fi
-
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
diff --git a/.github/workflows/build-stable-container.yml b/.github/workflows/build-stable-container.yml
index b5fbc705..25571ed6 100644
--- a/.github/workflows/build-stable-container.yml
+++ b/.github/workflows/build-stable-container.yml
@@ -1,6 +1,7 @@
name: Build and release container
on:
+ workflow_dispatch:
push:
tags:
- "v*"
@@ -13,19 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- - name: Install Crystal
- uses: crystal-lang/install-crystal@v1.8.2
- with:
- crystal: 1.12.2
-
- - name: Run lint
- run: |
- if ! crystal tool format --check; then
- crystal tool format
- git diff
- exit 1
- fi
-
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
@@ -46,9 +34,11 @@ jobs:
uses: docker/metadata-action@v5
with:
images: quay.io/invidious/invidious
+ flavor: |
+ latest=false
tags: |
type=semver,pattern={{version}}
- type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ type=raw,value=latest
labels: |
quay.expires-after=12w
@@ -70,10 +60,11 @@ jobs:
with:
images: quay.io/invidious/invidious
flavor: |
+ latest=false
suffix=-arm64
tags: |
type=semver,pattern={{version}}
- type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'master') }}
+ type=raw,value=latest
labels: |
quay.expires-after=12w
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 925a8fc7..5f859613 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -38,10 +38,10 @@ jobs:
matrix:
stable: [true]
crystal:
- - 1.9.2
- - 1.10.1
- - 1.11.2
- 1.12.1
+ - 1.13.2
+ - 1.14.0
+ - 1.15.0
include:
- crystal: nightly
stable: false
@@ -51,6 +51,11 @@ jobs:
with:
submodules: true
+ - name: Install required APT packages
+ run: |
+ sudo apt install -y libsqlite3-dev
+ shell: bash
+
- name: Install Crystal
uses: crystal-lang/install-crystal@v1.8.0
with:
@@ -59,7 +64,9 @@ jobs:
- name: Cache Shards
uses: actions/cache@v3
with:
- path: ./lib
+ path: |
+ ./lib
+ ./bin
key: shards-${{ hashFiles('shard.lock') }}
- name: Install Shards
@@ -71,14 +78,6 @@ jobs:
- name: Run tests
run: crystal spec
- - name: Run lint
- run: |
- if ! crystal tool format --check; then
- crystal tool format
- git diff
- exit 1
- fi
-
- name: Build
run: crystal build --warnings all --error-on-warnings --error-trace src/invidious.cr
@@ -90,10 +89,10 @@ jobs:
- uses: actions/checkout@v4
- name: Build Docker
- run: docker-compose build --build-arg release=0
+ run: docker compose build --build-arg release=0
- name: Run Docker
- run: docker-compose up -d
+ run: docker compose up -d
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done
@@ -124,14 +123,19 @@ jobs:
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done
- ameba_lint:
+ lint:
+
runs-on: ubuntu-latest
+
+ continue-on-error: true
+
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Crystal
+ id: lint_step_install_crystal
uses: crystal-lang/install-crystal@v1.8.0
with:
crystal: latest
@@ -142,10 +146,21 @@ jobs:
path: |
./lib
./bin
- key: shards-${{ hashFiles('shard.lock') }}
+ key: shards-${{ hashFiles('shard.lock') }}-${{ steps.lint_step_install_crystal.outputs.crystal }}
- name: Install Shards
- run: shards install
+ run: |
+ if ! shards check; then
+ shards install
+ fi
+
+ - name: Check Crystal formatter compliance
+ run: |
+ if ! crystal tool format --check; then
+ crystal tool format
+ git diff
+ exit 1
+ fi
- name: Run Ameba linter
run: bin/ameba
diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml
index 16d3269b..498a2c1b 100644
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -13,14 +13,11 @@ jobs:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- days-before-stale: 365
- days-before-pr-stale: 90
- days-before-close: 30
- exempt-pr-labels: blocked,exempt-stale
+ days-before-stale: 730
+ days-before-pr-stale: -1
+ days-before-close: 60
stale-issue-message: 'This issue has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely outdated. If you think this issue is still relevant and applicable, you just have to post a comment and it will be unmarked.'
- stale-pr-message: 'This pull request has been automatically marked as stale and will be closed in 30 days because it has not had recent activity and is much likely abandoned or outdated. If you think this pull request is still relevant and applicable, you just have to post a comment and it will be unmarked.'
stale-issue-label: "stale"
- stale-pr-label: "stale"
ascending: true
- # Never mark feature requests/enhancements as stale
- exempt-issue-labels: "feature-request,enhancement,exempt-stale"
+ # Exempt the following types of issues from being staled
+ exempt-issue-labels: "feature-request,enhancement,discussion,exempt-stale"