-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into mb/add_monitoring
- Loading branch information
Showing
8 changed files
with
49 additions
and
276 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# GitHub action to check if pre-commit has been run. Runs from .pre-commit-config.yaml, where the pre-commit actions are. | ||
|
||
name: validate | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.ref }}" | ||
cancel-in-progress: true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout (GitHub) | ||
uses: actions/checkout@v3 | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Pre-build dev container image | ||
uses: devcontainers/[email protected] | ||
with: | ||
imageName: ghcr.io/martinbernstorff/personal-mnemonic-medium | ||
cacheFrom: ghcr.io/martinbernstorff/personal-mnemonic-medium | ||
push: always | ||
runCmd: | ||
make validate |
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,33 +1,14 @@ | ||
# Use an official Python runtime as a parent image | ||
FROM python:3.9-bullseye | ||
FROM python:3.10-bullseye | ||
|
||
# Set the working directory to /app | ||
WORKDIR /app | ||
|
||
# Install deps | ||
COPY pyproject.toml /app/ | ||
COPY pyproject.toml ./ | ||
RUN pip install .[dev] | ||
RUN pip install .[tests] | ||
|
||
# Setup dev env | ||
COPY tasks.py pyproject.toml ./ | ||
RUN inv static-type-checks | ||
|
||
COPY .pre-commit-config.yaml ./ | ||
RUN git init && pre-commit run | ||
|
||
RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | grep -Po '"tag_name": "v\K[^"]*') \ | ||
&& curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" \ | ||
&& tar xf lazygit.tar.gz lazygit \ | ||
&& install lazygit /usr/local/bin | ||
RUN mkdir -p ~/.config/lazygit/ && touch ~/.config/lazygit/config.yml && echo "disableStartupPopups: true" >> ~/.config/lazygit/config.yml | ||
|
||
RUN type -p curl >/dev/null || (apt update && apt install curl -y) && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg \ | ||
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \ | ||
&& apt update \ | ||
&& apt install gh -y | ||
|
||
# Install the entire app | ||
COPY . /app | ||
RUN pip install -e . |
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
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