sops-decrypt/.gitea/workflows/build-and-push.yaml
Mark Kaulertz 9d539c78c4
All checks were successful
Build and Push SOPS Decrypt Image / build-and-push (push) Successful in 13s
update repo credential references
2025-06-20 11:46:37 +02:00

43 lines
1.3 KiB
YAML

name: Build and Push SOPS Decrypt Image
# This workflow runs on any push to the 'main' or 'master' branch
on:
push:
branches:
- main
- master
jobs:
build-and-push:
# Use a standard Linux runner
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- name: Checkout repository
uses: actions/checkout@v4
# Step 2: Log in to the Gitea Container Registry
# It uses the secrets we created earlier.
- name: Log in to Gitea Registry
uses: docker/login-action@v3
with:
# Use '!<Gitea-instance-URL>' for the registry address
# Example: registry: gitea.yourcompany.com
#registry: ${{ gitea.instance }}
registry: git.m0ark.de
username: ${{ vars.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
# Step 3: Build the Docker image and push it to the registry
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
# The directory containing your Dockerfile
context: .
# Push the image after building
push: true
# Define the tags for the image
tags: |
git.m0ark.de/docker/sops-decrypt:latest
git.m0ark.de/docker/sops-decrypt:${{ gitea.sha }}