1
1
Fork 0
mirror of https://github.com/schollz/croc.git synced 2025-10-11 13:21:00 +02:00
This commit is contained in:
blu3 2025-01-31 11:57:55 +03:00 committed by GitHub
parent 3b21ec5867
commit 55624c7b63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,37 +1,22 @@
# This is a basic workflow to help you get started with Actions name: Deploy Docker
name: CD
# Controls when the action will run.
on: on:
# Triggers the workflow on push or pull request events but only for the main branch
push: push:
branches:
- '*'
tags:
- 'v*'
pull_request: pull_request:
branches:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-24.04
steps: steps:
- - name: Checkout repository
name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
-
name: Docker meta - name: Docker meta
id: docker_meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: schollz/croc images: schollz/croc
# generate Docker tags based on the following events/attributes
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
@ -39,21 +24,21 @@ jobs:
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}} type=semver,pattern={{major}}
type=sha type=sha
-
name: Set up QEMU - name: Setup QEMU
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub - name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push - name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v6
with: with:
context: . context: .