Skip to content

Publish Docker Image #417

Publish Docker Image

Publish Docker Image #417

Workflow file for this run

name: Publish Docker Image
on:
schedule:
# run on 1th and 15th of each month
- cron: '1 2 1,15 * *'
push:
branches:
- main
- ghactionstest
tags:
- '*'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: gautamkrishnar/keepalive-workflow@v2
-
name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
danteev/texlive
ghcr.io/dante-ev/texlive
tags: |
type=schedule,pattern={{date 'YYYY-MM-DD'}}
type=ref,event=tag
type=edge,branch=main
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: koppor
password: ${{ secrets.CR_PAT }}
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}