Skip to content

Docker

Docker #1223

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '30 5 * * *'
jobs:
docker-image:
name: Build docker image
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: aspettl/ccliwrapper
flavor: |
latest=false
tags: |
type=edge
type=schedule,pattern=nightly
type=ref,event=tag
type=ref,event=pr
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha