1
0
mirror of https://github.com/schollz/croc.git synced 2024-11-27 12:34:19 +03:00

Merge pull request #645 from rehanone/fix-docker-deplyment

Update and fix the docker image deplyment build
This commit is contained in:
Zack 2024-01-25 07:59:36 -08:00 committed by GitHub
commit 47fc96b98f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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:
@ -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