Skip to content

Update to Python 3.11 #227

Update to Python 3.11

Update to Python 3.11 #227

Workflow file for this run

name: "Docker build and push (image: backend)"
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 10
- name: Login to ghcr registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ secrets.GH_USERNAME }}
password: ${{ secrets.GH_ACCESS_TOKEN }}
- name: Prepare version info
run: |
echo "LATEST_COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Write version file
run: echo "${{ env.LATEST_COMMIT_SHA }}" > version.txt
- name: Build and push Docker images
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
tags: |
ghcr.io/studentiunimi/backend:${{ env.LATEST_COMMIT_SHA }}
ghcr.io/studentiunimi/backend:latest
push: true
- uses: actions/checkout@v2
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
with:
environment: production
version: ${{ env.LATEST_COMMIT_SHA }}
set_commits: auto
finalize: true
ignore_missing: true
ignore_empty: true