Skip to content

publish

publish #7

Workflow file for this run

name: Publish Docker image
on:
push:
tags:
- 'v*'
jobs:
build-and-push:
runs-on: ubuntu-22.04
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/gin-blog-template:${{ github.ref_name }}
build-args: VERSION=${{ github.ref_name }}