Skip to content

Bump github/codeql-action from 2 to 3 #186

Bump github/codeql-action from 2 to 3

Bump github/codeql-action from 2 to 3 #186

Workflow file for this run

# Based on https://docs.docker.com/build/ci/github-actions/manage-tags-labels/
name: Build and Publish Docker Images
on:
push:
branches:
- '**'
pull_request:
branches:
- main
jobs:
build-bot:
name: Build Bot
runs-on: ubuntu-latest
# Skip for dependabot pushes due to lack of permissions
if: github.event_name != 'push' || github.actor != 'dependabot[bot]'
steps:
- name: Free Disk Space
uses: jlumbroso/[email protected]
with:
tool-cache: true
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- id: meta
name: Docker Meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}
tags: |
type=raw,value=latest,enable={{is_default_branch}},priority=1100
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Disabled for reasons discussed in https://github.com/docker/build-push-action/issues/820
provenance: false
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
cache-to: type=inline
build-stt:
name: Build STT
runs-on: ubuntu-latest
# Skip for dependabot pushes due to lack of permissions
if: github.event_name != 'push' || github.actor != 'dependabot[bot]'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- id: meta
name: Docker Meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/stt
tags: |
type=raw,value=latest,enable={{is_default_branch}},priority=1100
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./stt
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Disabled for reasons discussed in https://github.com/docker/build-push-action/issues/820
provenance: false
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}/stt:latest
cache-to: type=inline