Skip to content

Commit c943a33

Browse files
Merge branch 'Viren070:main' into main
2 parents 4c5b301 + 927cb7f commit c943a33

File tree

14 files changed

+208
-69
lines changed

14 files changed

+208
-69
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
name: Build Addon
22

33
on:
4-
push:
5-
branches:
6-
- main
7-
paths:
8-
- 'packages/**'
9-
- 'package-lock.json'
10-
- 'package.json'
11-
- 'tsconfig.json'
12-
- 'tsconfig.base.json'
134
pull_request:
145
branches:
156
- main
Lines changed: 71 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,90 @@
1-
name: Deploy Docker image to GitHub Container Registry and Docker Hub
1+
name: Build and Deploy Docker Images
22

33
on:
4-
push:
5-
tags:
6-
- 'v*' # Trigger on any tag that starts with 'v'
7-
branches:
8-
- main # Trigger on push to main branch
4+
workflow_dispatch:
5+
inputs:
6+
ref:
7+
description: Git Ref
8+
required: true
9+
type: string
910

1011
jobs:
11-
docker:
12+
build:
13+
name: build
1214
runs-on: ubuntu-latest
15+
permissions:
16+
packages: write
17+
contents: read
1318
steps:
14-
# Checkout the repository
15-
- name: Checkout repository
19+
- name: Checkout
1620
uses: actions/checkout@v4
17-
18-
# Set up QEMU for multi-platform builds
19-
- name: Set up QEMU
20-
uses: docker/setup-qemu-action@v3
21-
22-
# Set up Docker Buildx
23-
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v3
25-
26-
# Log in to GitHub Container Registry (GHCR)
27-
- name: Log in to GitHub Container Registry
28-
uses: docker/login-action@v3
2921
with:
30-
registry: ghcr.io
31-
username: ${{ github.actor }}
32-
password: ${{ secrets.GITHUB_TOKEN }}
22+
fetch-depth: 0
23+
ref: ${{inputs.ref}}
24+
token: ${{ secrets.GITHUB_TOKEN }}
3325

34-
# Log in to Docker Hub
35-
- name: Log in to Docker Hub
36-
if: startsWith(github.ref, 'refs/tags/v')
26+
- name: Login to Docker Hub
3727
uses: docker/login-action@v3
3828
with:
3929
username: ${{ secrets.DOCKERHUB_USERNAME }}
4030
password: ${{ secrets.DOCKERHUB_TOKEN }}
4131

42-
# Build and push Docker image to both GHCR and Docker Hub
43-
- name: Build and push Docker image (tags)
44-
if: startsWith(github.ref, 'refs/tags/v')
45-
uses: docker/build-push-action@v6
32+
- name: Login to GitHub Container Registry
33+
uses: docker/login-action@v3
4634
with:
47-
platforms: linux/amd64,linux/arm64
48-
push: true
49-
tags: |
50-
ghcr.io/viren070/aiostreams:${{ github.ref_name }}
51-
ghcr.io/viren070/aiostreams:latest
52-
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/aiostreams:${{ github.ref_name }}
53-
docker.io/${{ secrets.DOCKERHUB_USERNAME }}/aiostreams:latest
54-
55-
# Build and push Docker image to GHCR only for each commit to main branch
56-
- name: Build and push Docker image (dev)
57-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
35+
registry: ghcr.io
36+
username: ${{ github.repository_owner }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Set up QEMU
40+
uses: docker/setup-qemu-action@v3
41+
42+
- name: Set up Buildx
43+
uses: docker/setup-buildx-action@v3
44+
45+
- name: Calculate Image Tags
46+
env:
47+
INPUT_REF: ${{inputs.ref}}
48+
run: |
49+
declare TAGS=""
50+
case "${INPUT_REF}" in
51+
v[0-9]*.[0-9]*.[0-9]*)
52+
TAGS="${INPUT_REF}"
53+
if [[ "$(git rev-parse origin/main)" = "$(git rev-parse "${INPUT_REF}")" ]]; then
54+
TAGS="${TAGS} latest"
55+
fi
56+
;;
57+
[0-9]*.[0-9]*.[0-9]*-nightly)
58+
TAGS="${INPUT_REF} nightly"
59+
;;
60+
*)
61+
echo "Invalid Input Ref: ${INPUT_REF}"
62+
exit 1
63+
esac
64+
65+
if [[ -z "${TAGS}" ]]; then
66+
echo "Empty Tags!"
67+
exit 1
68+
fi
69+
70+
{
71+
echo 'DOCKER_IMAGE_TAGS<<EOF'
72+
for tag in ${TAGS}; do
73+
echo "viren070/aiostreams:${tag}"
74+
echo "ghcr.io/viren070/aiostreams:${tag}"
75+
done
76+
echo EOF
77+
} >> "${GITHUB_ENV}"
78+
79+
cat "${GITHUB_ENV}"
80+
81+
- name: Build & Push
5882
uses: docker/build-push-action@v6
5983
with:
84+
cache-from: type=gha
85+
cache-to: type=gha,mode=max
6086
platforms: linux/amd64,linux/arm64
6187
push: true
62-
tags: ghcr.io/viren070/aiostreams:dev
88+
context: .
89+
file: ./Dockerfile
90+
tags: ${{env.DOCKER_IMAGE_TAGS}}

.github/workflows/nightly.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Nightly Builds
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'packages/**'
8+
- 'package-lock.json'
9+
- 'package.json'
10+
- 'tsconfig.json'
11+
- 'tsconfig.base.json'
12+
- 'Dockerfile'
13+
14+
jobs:
15+
release:
16+
name: release
17+
if: ${{ github.ref == 'refs/heads/main' }}
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: write
21+
contents: write
22+
pull-requests: write
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Generate timestamp tag
28+
id: gen_tag
29+
run: |
30+
TIMESTAMP=$(date '+%Y.%m.%d.%H%M-nightly')
31+
echo "tag_name=$TIMESTAMP" >> $GITHUB_OUTPUT
32+
33+
- name: Create git tag
34+
env:
35+
TAG_NAME: ${{ steps.gen_tag.outputs.tag_name }}
36+
run: |
37+
git config user.name "github-actions[bot]"
38+
git config user.email "github-actions[bot]@users.noreply.github.com"
39+
git tag $TAG_NAME
40+
git push origin $TAG_NAME
41+
42+
- name: Get commit message
43+
id: commit_msg
44+
run: |
45+
COMMIT_MSG=$(git log -1 --pretty=%B)
46+
echo "commit_msg<<EOF" >> $GITHUB_OUTPUT
47+
echo "$COMMIT_MSG" >> $GITHUB_OUTPUT
48+
echo "EOF" >> $GITHUB_OUTPUT
49+
50+
- name: Create GitHub prerelease
51+
env:
52+
GH_TOKEN: ${{ github.token }}
53+
run: |
54+
gh release create "${{ steps.gen_tag.outputs.tag_name }}" \
55+
--repo "${GITHUB_REPOSITORY}" \
56+
--title "${{ steps.gen_tag.outputs.tag_name }}" \
57+
--notes "${{ steps.commit_msg.outputs.commit_msg }}" \
58+
--prerelease
59+
60+
- name: Trigger Docker Image Publish
61+
env:
62+
GH_TOKEN: ${{ github.token }}
63+
run: |
64+
gh workflow run --repo ${GITHUB_REPOSITORY} deploy-docker.yml -f ref=${{ steps.gen_tag.outputs.tag_name }}

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: ${{ github.ref == 'refs/heads/main' }}
13+
runs-on: ubuntu-latest
14+
permissions:
15+
actions: write
16+
contents: write
17+
pull-requests: write
18+
steps:
19+
- name: Release
20+
id: release
21+
uses: google-github-actions/release-please-action@v4
22+
with:
23+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
24+
25+
- name: Trigger Docker Image Publish
26+
if: ${{ steps.release.outputs['release_created'] }}
27+
env:
28+
GH_TOKEN: ${{ github.token }}
29+
TAG_NAME: ${{ steps.release.outputs.tag_name }}
30+
run: |
31+
gh workflow run --repo ${GITHUB_REPOSITORY} deploy-docker.yml -f ref=${TAG_NAME}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.22.0"
3+
}

CHANGELOG.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
3+
## [1.22.0](https://github.com/Viren070/AIOStreams/compare/v1.21.1...v1.22.0) (2025-05-22)
44

5-
## [1.14.2](https://github.com/Viren070/aiostreams/compare/v1.14.1...v1.14.2) (2025-03-18)
65

6+
### Features
77

8-
### Bug Fixes
9-
10-
* attempt to fix release.yml ([960de88](https://github.com/Viren070/aiostreams/commit/960de88cc59304bde772be86d75e2ab88b48d1b6))
11-
* **easynews-plus:** encode easynews credentials ([71f2ad4](https://github.com/Viren070/aiostreams/commit/71f2ad434fa0bbbfaf93ec489b48752d8ee6f3a1))
12-
* **easynews:** encode easynews credentials ([e8cd4a4](https://github.com/Viren070/aiostreams/commit/e8cd4a49a058f1b4035b23824cde490c2c598013))
13-
* extract config string for custom configs when determining whether to encrypt sensitive information ([57649f0](https://github.com/Viren070/aiostreams/commit/57649f07f657941abe3fefd01a2c5b7462b11382))
14-
* filter out zero counts from skip reasons in logs ([d0db4db](https://github.com/Viren070/aiostreams/commit/d0db4dbf91c415405702f8e64af901f97a60f5b4))
8+
* pass `baseUrl` in Easynews++ config and add optional `EASYNEWS_PLUS_PLUS_PUBLIC_URL`. ([b41e210](https://github.com/Viren070/AIOStreams/commit/b41e210c04777b349629dc98f28982bfb2e54886))
9+
* stremthru improvements ([#172](https://github.com/Viren070/AIOStreams/issues/172)) ([72b5ab6](https://github.com/Viren070/AIOStreams/commit/72b5ab648e511220d7ff8b4bf453db94bb952b30))

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
<p align="center">
55
<a>
6-
<img src="https://img.shields.io/github/check-runs/Viren070/AIOStreams/main?style=for-the-badge" alt="Discord Server">
6+
<img src="https://img.shields.io/github/actions/workflow/status/viren070/aiostreams/deploy-docker.yml?style=for-the-badge" alt="Discord Server">
77
</a>
88
<a>
9-
<img src="https://img.shields.io/docker/v/viren070/aiostreams?style=for-the-badge" alt="version">
9+
<img src="https://img.shields.io/github/v/release/viren070/aiostreams?style=for-the-badge" alt="version">
1010
</a>
1111
<a href="https://github.com/Viren070/AIOStreams/stargazers">
1212
<img src="https://img.shields.io/github/stars/Viren070/AIOStreams?style=for-the-badge" alt="GitHub Stars">

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aiostreams",
3-
"version": "1.21.1",
3+
"version": "1.22.0",
44
"description": "Stremio addon to combine streams into one addon",
55
"main": "dist/server.js",
66
"scripts": {

packages/addon/src/manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Config } from '@aiostreams/types';
2-
import { version, description } from '../package.json';
2+
import { version, description } from '../../../package.json';
33
import { getTextHash, Settings } from '@aiostreams/utils';
44

55
const manifest = (config?: Config, configPresent?: boolean) => {

0 commit comments

Comments
 (0)