Skip to content

add meme gorilla_throw (#190) #182

add meme gorilla_throw (#190)

add meme gorilla_throw (#190) #182

name: Build docker image for github-meme-bot
on:
push:
branches:
- "main"
tags:
- "v*"
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Setup Docker
uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate Tags
uses: docker/metadata-action@v4
id: metadata
with:
images: ghcr.io/meetwq/github-meme-bot
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
- name: Build and Publish
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.memebot
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max