omaroughriss 9d365dc862
All checks were successful
Build and Push to Registry / build-and-push (push) Successful in 1m49s
Update conf
2025-07-03 13:09:19 +02:00

49 lines
1.2 KiB
YAML

name: Build and Push to Registry
on:
push:
branches: [ cicd ]
env:
REGISTRY: git.4nkweb.com
IMAGE_NAME: 4nk/sdk_relay
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up SSH agent
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.USER }}
password: ${{ secrets.TOKEN }}
- name: Prepare Config
id: prep
run: |
ESCAPED_CONF=$(echo '${{ secrets.CONF }}' | sed 's/"/\\"/g')
echo "conf=$ESCAPED_CONF" >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
ssh: default
build-args: |
CONF=${{ steps.prep.outputs.conf }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ gitea.sha }}