init gitea workflow

This commit is contained in:
boxi committed 2026-01-06 21:07:29 +01:00
1 parent 1b354f2dff
commit 8217cf9985
1 file changed
+44
+44
View File
@@ -0,0 +1,44 @@
name: Build and Push ApacheOIDC Docker Image
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to Registry
uses: docker/login-action@v2
with:
registry: eiche:3000
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Docker imageTags
run: |
REPOSITORY_LC=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
echo "versioned: eiche:3000/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER}"
echo "latest: eiche:3000/${REPOSITORY_LC}:latest"
- name: Build Docker Image
run: |
REPOSITORY_LC=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
# Build the image with the commit hash tag
docker build -t eiche:3000/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER} .
# Tag the same image as "latest"
docker tag eiche:3000/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER} eiche:3000/${REPOSITORY_LC}:latest
- name: Push Docker Images
run: |
REPOSITORY_LC=$(echo "${{ gitea.repository }}" | tr '[:upper:]' '[:lower:]')
docker push eiche:3000/${REPOSITORY_LC}:${GITHUB_RUN_NUMBER}
docker push eiche:3000/${REPOSITORY_LC}:latest
- name: Log out from registry
if: always()
run: docker logout eiche:3000
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.