build(deps): bump paambaati/codeclimate-action from 6.0.0 to 9.0.0 #504
Workflow file for this run
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: Docker build and export | |
on: | |
push: | |
branches: | |
- "master" | |
pull_request: | |
branches: | |
- "master" | |
env: | |
WEB_TEST_IMAGE: dbase-web:test | |
WEB_IMAGE: gafderkspersonal/dbase-web | |
NGINX_TEST_IMAGE: dbase-nginx:test | |
NGINX_IMAGE: gafderkspersonal/dbase-nginx | |
jobs: | |
build: | |
environment: CI | |
runs-on: ubuntu-latest | |
env: | |
SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Fallback SECRET_KEY | |
if: github.actor == 'dependabot[bot]' | |
run: echo "SECRET_KEY=fallbacktc5*3ih&7ru&4&#!l7uyu5ufvwtplg+bw5t9(%-ra_qb&%x*rp" >> $GITHUB_ENV | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
if: github.actor != 'dependabot[bot]' | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set short git commit SHA | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Output git commit SHA | |
run: echo ${{ steps.vars.outputs.sha_short }} | |
- name: Build web test image | |
uses: docker/build-push-action@v6 | |
with: | |
target: web-test | |
context: . | |
load: true | |
tags: ${{ env.WEB_TEST_IMAGE }} | |
- name: Test web test image | |
run: | | |
docker run \ | |
-e SECRET_KEY="${{ env.SECRET_KEY }}" \ | |
-e DATABASE_URL="sqlite:////app/db.sqlite3" \ | |
-e DEBUG=on \ | |
--rm ${{ env.WEB_TEST_IMAGE }} \ | |
python manage.py test --exclude-tag=functional -v 2 | |
- name: Build nginx image | |
uses: docker/build-push-action@v6 | |
with: | |
target: nginx | |
context: . | |
load: true | |
tags: ${{ env.NGINX_TEST_IMAGE }} | |
- name: Publish web image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
target: runtime | |
tags: ${{ env.WEB_IMAGE }}:latest,${{ env.WEB_IMAGE }}:${{ steps.vars.outputs.sha_short }} | |
if: github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' | |
- name: Publish nginx image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: true | |
target: nginx | |
tags: ${{ env.NGINX_IMAGE }}:latest,${{ env.NGINX_IMAGE }}:${{ steps.vars.outputs.sha_short }} | |
if: github.actor != 'dependabot[bot]' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' |