⬆️ auto update by pre-commit hooks (#12) #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Docker | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Github Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Generate Tags | |
uses: docker/metadata-action@v3 | |
id: metadata | |
with: | |
images: ghcr.io/nonebot/auto-changelog | |
tags: | | |
type=semver,pattern={{version}} | |
type=ref,event=branch | |
- name: Build and Publish | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: Dockerfile | |
push: true | |
tags: ${{ steps.metadata.outputs.tags }} | |
labels: ${{ steps.metadata.outputs.labels }} |