Prepare for CI

This commit is contained in:
2024-05-08 23:42:23 +02:00
parent b1f6e7016a
commit b57b2db2ad
6 changed files with 313 additions and 183 deletions
+38
View File
@@ -0,0 +1,38 @@
name: release-tag
on: push
jobs:
release-image:
runs-on: ubuntu-latest
env:
DOCKER_ORG: legonzaur
DOCKER_LATEST: nightly
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: git.legonzaur.fr
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: | # replace it with your local IP and tags
git.legonzaur.fr/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.meta.outputs.REPO_VERSION }}
git.legonzaur.fr/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ env.DOCKER_LATEST }}