-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #116 from TheLovinator1/rewrite
Rewrite bot - Use Nitter instead of Twitter API
- Loading branch information
Showing
46 changed files
with
4,281 additions
and
3,009 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ | ||
"minor", | ||
"patch", | ||
"pin", | ||
"digest" | ||
], | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true | ||
} | ||
], | ||
"dependencyDashboard": false, | ||
"enabledManagers": [ | ||
"dockerfile", | ||
"docker-compose", | ||
"poetry", | ||
"github-actions" | ||
], | ||
"lockFileMaintenance": { | ||
"enabled": true, | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true | ||
}, | ||
"timezone": "Europe/Stockholm" | ||
} | ||
{ | ||
"extends": [ | ||
"config:base" | ||
], | ||
"packageRules": [ | ||
{ | ||
"matchUpdateTypes": [ | ||
"minor", | ||
"patch", | ||
"pin", | ||
"digest" | ||
], | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true | ||
} | ||
], | ||
"dependencyDashboard": false, | ||
"enabledManagers": [ | ||
"dockerfile", | ||
"docker-compose", | ||
"poetry", | ||
"github-actions" | ||
], | ||
"lockFileMaintenance": { | ||
"enabled": true, | ||
"automerge": true, | ||
"automergeType": "pr", | ||
"platformAutomerge": true | ||
}, | ||
"timezone": "Europe/Stockholm" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,50 @@ | ||
name: Docker | ||
|
||
on: | ||
schedule: | ||
- cron: "20 6 * * *" | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
env: | ||
BEARER_TOKEN: ${{ secrets.BEARER_TOKEN }} | ||
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }} | ||
RULE: "(from:Steam OR from:Xbox OR from:PlayStation) -is:retweet -is:reply -is:quote" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v3 | ||
|
||
# We need to set up QEMU and Docker Buildx to build multi-architecture images | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
# Install Poetry and install dependencies | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "poetry" | ||
- run: poetry install | ||
|
||
# Run tests | ||
- run: poetry run pytest | ||
- uses: docker/login-action@v2 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Build and push the image to Docker Hub | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64, linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: thelovinator/discord-twitter-webhooks:latest | ||
name: Docker | ||
|
||
on: | ||
schedule: | ||
- cron: "20 6 * * *" | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository | ||
- uses: actions/checkout@v3 | ||
|
||
# We need to set up QEMU and Docker Buildx to build multi-architecture images | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
with: | ||
platforms: all | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
# Install Poetry and install dependencies | ||
- run: pipx install poetry | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
cache: "poetry" | ||
- run: poetry install | ||
|
||
# Run tests | ||
- run: poetry run pytest | ||
- uses: docker/login-action@v2 | ||
if: github.event_name != 'pull_request' | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
# Build and push the image to Docker Hub | ||
- name: Build and push Docker image | ||
id: build-and-push | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64, linux/arm64 | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: thelovinator/discord-twitter-webhooks:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
# Mirror this GitHub repository to Codeberg and GitLab | ||
# Uses https://github.com/pixta-dev/repository-mirroring-action | ||
name: Mirror repo to other sites | ||
on: | ||
push: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 5 * * 6" | ||
jobs: | ||
codeberg: | ||
name: Mirror to Codeberg | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: "git@codeberg.org:TheLovinator/discord-twitter-webhooks.git" | ||
ssh_private_key: ${{ secrets.CODEBERG_SSH }} | ||
gitlab: | ||
name: Mirror to GitLab | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: "git@gitlab.com:TheLovinator/discord-twitter-webhooks.git" | ||
ssh_private_key: ${{ secrets.GITLAB_SSH }} | ||
# Mirror this GitHub repository to Codeberg and GitLab | ||
# Uses https://github.com/pixta-dev/repository-mirroring-action | ||
name: Mirror repo to other sites | ||
on: | ||
push: | ||
branches: ["master"] | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "0 5 * * 6" | ||
jobs: | ||
codeberg: | ||
name: Mirror to Codeberg | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: "git@codeberg.org:TheLovinator/discord-twitter-webhooks.git" | ||
ssh_private_key: ${{ secrets.CODEBERG_SSH }} | ||
gitlab: | ||
name: Mirror to GitLab | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: pixta-dev/repository-mirroring-action@v1 | ||
with: | ||
target_repo_url: "git@gitlab.com:TheLovinator/discord-twitter-webhooks.git" | ||
ssh_private_key: ${{ secrets.GITLAB_SSH }} |
Oops, something went wrong.