Merge pull request #77 from RoboJackets/renovate/terser-5.x #182
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: Build | |
on: | |
- push | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
- name: Setup Poetry | |
uses: abatilo/actions-poetry@v4 | |
- name: Cache the virtualenv | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: venv-${{ hashFiles('poetry.lock') }} | |
- name: Install Poetry dependencies | |
run: poetry install | |
- name: Run black | |
run: poetry run black --check ramp_onboarding_ux.py | |
- name: Run flake8 | |
run: poetry run flake8 ramp_onboarding_ux.py | |
- name: Run pylint | |
run: poetry run pylint ramp_onboarding_ux.py | |
- name: Run mypy | |
run: poetry run mypy --strict --scripts-are-modules ramp_onboarding_ux.py | |
docker: | |
name: Docker | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to BCDC Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.bcdc.robojackets.net | |
username: ${{ secrets.BCDC_REGISTRY_USERNAME }} | |
password: ${{ secrets.BCDC_REGISTRY_PASSWORD }} | |
- name: Build and push | |
id: build | |
uses: docker/build-push-action@v6 | |
with: | |
tags: registry.bcdc.robojackets.net/ramp-onboarding-ux:latest | |
network: host | |
pull: true | |
push: true | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
outputs: | |
image-digest: ${{ steps.build.outputs.digest }} | |
deploy-test: | |
name: Deploy | |
needs: [lint, docker] | |
uses: ./.github/workflows/deploy.yml | |
concurrency: | |
group: deploy-test | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
with: | |
image-digest: ${{ needs.docker.outputs.image-digest }} | |
environment: test | |
deploy-production: | |
name: Deploy | |
needs: [lint, docker, deploy-test] | |
uses: ./.github/workflows/deploy.yml | |
if: ${{ github.ref == 'refs/heads/main' }} | |
concurrency: | |
group: deploy-production | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: read | |
with: | |
image-digest: ${{ needs.docker.outputs.image-digest }} | |
environment: production |