add GitHub Actions workflow for building and pushing Docker images
This commit is contained in:
41
.gitea/workflows/build.yml
Normal file
41
.gitea/workflows/build.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag to build and push'
|
||||
required: false
|
||||
default: 'latest'
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
|
||||
name: 🏗️✨ Build Workflow
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: 🖥️ 🔨 Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 📖 🔍 Checkout Repository Code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: 🔑 🔐 Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: 🏗️ 🔧 Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: 🐳 🔨 Build Container
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
sbom: true
|
||||
provenance: true
|
||||
platforms: linux/arm64,linux/amd64
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
tags: siteworxpro/gun-manager:${{ gitea.ref_name }}
|
Reference in New Issue
Block a user