Auto Update whatsmeow #246
This file contains hidden or 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
name: Auto Update whatsmeow | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.21.5' | |
- name: installing proto-gen-go | |
run: | | |
cd goneonize | |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest | |
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11.8" | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
version: "30.2" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
- name: fetch new proto files | |
run: | | |
uv sync --group dev | |
uv run task proto | |
git diff --exit-code || uv run task build proto | |
- uses: astral-sh/ruff-action@v3 | |
with: | |
args: "check --fix" | |
- name: format python style PEP8 standard | |
run: ruff check --fix && ruff format . | |
- name: Install Python lint libraries | |
run: | | |
pip3 install autopep8 autoflake isort black | |
- name: Check for showstoppers | |
run: autopep8 --verbose --in-place --recursive --aggressive --exclude='*/proto/*' . | |
- name: Remove unused imports and variables | |
run: autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables --exclude "*/proto/*" --ignore-init-module-imports . | |
- name: lint with isort and black | |
run: | | |
isort neonize --skip "neonize/proto" | |
black neonize --exclude "neonize/proto" | |
- name: update golang dependencies | |
run: cd goneonize && go get -u && go mod tidy | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v8 | |
with: | |
version: v2.1 # Specify a golangci-lint version | |
working-directory: goneonize | |
args: --issues-exit-code=0 # Exit with 0 even if issues are found, useful for reformatting | |
- name: Install gofumpt | |
run: go install mvdan.cc/gofumpt@latest | |
- name: reformat go | |
run: cd goneonize && gofumpt -l -w . | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v7 | |
with: | |
commit-message: | | |
Whatsmeow | |
- Update proto files | |
- Update golang depedencies | |
signoff: false | |
branch: whatsmeow_update | |
delete-branch: true | |
title: '[Update] Whatsmeow version' | |
body: | | |
Whatsmeow | |
- Update proto files | |
- Update golang depedencies | |
labels: | | |
proto | |
whatsmeow | |
goneonize | |
automated pr | |
assignees: krypton-byte | |
reviewers: krypton-byte | |
draft: false |