Skip to content

Commit

Permalink
add docker image push ci
Browse files Browse the repository at this point in the history
  • Loading branch information
YancyParker committed Jul 8, 2024
1 parent 7cab6d4 commit 1f32524
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and Publish Docker Image
on:
push:
branches:
- main
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5

jobs:
setup-build-publish:
name: Setup, Build and Publish
runs-on: ubuntu-latest
environment: production

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

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
push: true
tags: fiammachain/fiammad:${{ github.ref == 'refs/tags/*' && github.ref || github.sha }}

0 comments on commit 1f32524

Please sign in to comment.