git install #11
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
--- | |
name: test-pre-commit | |
on: | |
release: | |
types: [published] | |
push: | |
branches: | |
- develop | |
permissions: | |
contents: write | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: pages | |
cancel-in-progress: false | |
jobs: | |
pre-commit-check: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/pythonbiellagroup/dockbase/python-base:${{vars.BASE_DOCKER_VERSION}} | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install Git | |
run: sudo apt-get update && sudo apt-get install git -y | |
- name: Add mkdocs-material credentials | |
shell: bash | |
run: poetry config http-basic.mkdocs ${{secrets.GHCR_USERNAME}} ${{secrets.GHCR_TOKEN}} | |
- name: Install dependencies | |
shell: bash | |
run: poetry install | |
- name: Install pre-commit check | |
shell: bash | |
run: poetry run pre-commit install | |
- name: Run pre-commit check | |
shell: bash | |
run: poetry run pre-commit run -a |