Skip to content

Commit

Permalink
publish image to dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
pluja committed Aug 29, 2023
1 parent 9803a0d commit e8a7d6b
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker Image CI

on:
release:
types: [published]

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ format('{0}/blogo:{1}', secrets.DOCKERHUB_USERNAME, github.event.release.tag_name) }}
${{ format('{0}/blogo:latest', secrets.DOCKERHUB_USERNAME) }}

0 comments on commit e8a7d6b

Please sign in to comment.