Skip to content

Merge pull request #40 from halkeye/renovate/python-3.x #44

Merge pull request #40 from halkeye/renovate/python-3.x

Merge pull request #40 from halkeye/renovate/python-3.x #44

Workflow file for this run

name: docker
on:
push:
branches:
- 'master'
tags:
- 'v*'
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
halkeye/glossary-bot
ghcr.io/halkeye/glossary-bot
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ghcr.io
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/bake-action@v4
with:
push: ${{ github.event_name != 'pull_request' }}
files: |
./docker-bake.hcl
${{ steps.meta.outputs.bake-file }}
targets: build