Skip to content

Commit

Permalink
Merge pull request #116 from TheLovinator1/rewrite
Browse files Browse the repository at this point in the history
Rewrite bot - Use Nitter instead of Twitter API
  • Loading branch information
TheLovinator1 committed Jul 16, 2023
2 parents 9933ecc + af77d68 commit 575dc7e
Show file tree
Hide file tree
Showing 46 changed files with 4,281 additions and 3,009 deletions.
150 changes: 0 additions & 150 deletions .env.example

This file was deleted.

64 changes: 32 additions & 32 deletions .github/renovate.json
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"
}
104 changes: 50 additions & 54 deletions .github/workflows/docker-publish.yml
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
64 changes: 32 additions & 32 deletions .github/workflows/sync-with-mirrors.yml
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 }}
Loading

0 comments on commit 575dc7e

Please sign in to comment.