chore(deps): update dependency starlette to v0.40.0 [security] #236
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 | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
permissions: | |
packages: write | |
on: | |
push: | |
branches: [ main ] | |
# Publish semver tags as releases. | |
tags: [ 'v*' ] | |
pull_request_target: | |
branches: [ main ] | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: ghcr.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository_owner }}/${{ github.event.repository.name }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
# Login to Docker Hub for increased public repositories quotas | |
- name: Login to Docker Hub | |
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
# Login against a Docker registry except on PR | |
# https://github.com/docker/login-action | |
- name: Log into GHCR registry | |
if: github.event_name != 'pull_request' | |
uses: docker/login-action@7ca345011ac4304463197fac0e56eab1bc7e6af0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Extract metadata (tags, labels) for Docker | |
# https://github.com/docker/metadata-action | |
- name: Extract Docker metadata | |
id: meta | |
uses: docker/metadata-action@906ecf0fc0a80f9110f79d9e6c04b1080f4a2621 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: Free Disk Space | |
uses: jlumbroso/free-disk-space@v1.3.1 | |
with: | |
tool-cache: false | |
# Build and push Docker image with Buildx (don't push on PR) | |
# https://github.com/docker/build-push-action | |
- name: Build and push Docker image | |
uses: docker/build-push-action@11be14d908760a0756f045980728ec5fb7880f74 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
platforms: linux/amd64,linux/arm64 |