Files
sshecret/.gitea/workflows/build.yml
Allan Eising 435b9dee83
All checks were successful
Build and push image / build-containers (push) Successful in 9m11s
Create Gitea workflow
2025-06-01 17:31:33 +02:00

67 lines
1.9 KiB
YAML

name: Build and push image
on:
push:
branches: [main]
jobs:
build-containers:
runs-on: ubuntu-latest
env:
DOCKER_ORG: eising
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v2
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: git.eising.cloud # replace it with your local IP
username: ${{ gitea.actor }}
password: ${{ secrets.MY_GITEA_TOKEN }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo ${{ gitea.actor }}
echo ${{ gitea.token }}
- name: Build backend and push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile.backend
platforms: |
linux/amd64
push: true
tags: |
git.eising.cloud/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}-backend:${{ gitea.ref == 'refs/heads/main' && 'latest' || gitea.sha }}
- name: Build backend and push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile.sshd
platforms: |
linux/amd64
push: true
tags: |
git.eising.cloud/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}-sshd:${{ gitea.ref == 'refs/heads/main' && 'latest' || gitea.sha }}
- name: Build backend and push
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile.admin
platforms: |
linux/amd64
push: true
tags: |
git.eising.cloud/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}-admin:${{ gitea.ref == 'refs/heads/main' && 'latest' || gitea.sha }}