Skip to content

Commit

Permalink
Merge pull request #645 from rehanone/fix-docker-deplyment
Browse files Browse the repository at this point in the history
Update and fix the docker image deplyment build
  • Loading branch information
schollz authored Jan 25, 2024
2 parents c136767 + d4bba88 commit 47fc96b
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ name: CD
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand All @@ -19,32 +24,37 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
-
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
uses: docker/metadata-action@v4
with:
images: schollz/croc
# tag-semver: "{{version}}"
tag-sha: true
tag-latest: true
# generate Docker tags based on the following events/attributes
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
Expand Down

0 comments on commit 47fc96b

Please sign in to comment.