-
Notifications
You must be signed in to change notification settings - Fork 0
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 #2 from cowprotocol/workflows2
github workflow for PR
- Loading branch information
Showing
11 changed files
with
436 additions
and
350 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
tags: [v*] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ghcr.io/${{ github.repository }} | ||
labels: | | ||
org.opencontainers.image.licenses=MIT OR Apache-2.0 | ||
- name: Push Project Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: . | ||
file: Dockerfile | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- uses: cowprotocol/autodeploy-action@v2 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
images: ghcr.io/cowprotocol/token-imbalances:main | ||
url: ${{ secrets.AUTODEPLOY_URL }} | ||
token: ${{ secrets.AUTODEPLOY_TOKEN }} | ||
timeout: 600000 # 10 minutes |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: pull request | ||
on: | ||
pull_request: | ||
push: | ||
branches: [ main ] | ||
jobs: | ||
python: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python 3.12 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.12' | ||
- name: Install Requirements | ||
run: | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
- name: Set PYTHONPATH | ||
run: echo "PYTHONPATH=src" >> $GITHUB_ENV | ||
- name: Pylint | ||
run: | ||
pylint --fail-under=8 $(git ls-files '**/*.py') | ||
- name: Black | ||
run: | ||
black --check ./ | ||
- name: Type Check (mypy) | ||
run: mypy src |
Oops, something went wrong.