Initial commit
This commit is contained in:
37
.github/workflows/ci.yaml
vendored
Normal file
37
.github/workflows/ci.yaml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
env:
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- id: version
|
||||
name: Version
|
||||
run: |
|
||||
if [ "${{ github.ref_type }}" = 'tag' ]; then
|
||||
newVersion="${{ github.ref_name }}"
|
||||
else
|
||||
newVersion=$(git describe --tags --abbrev=0 2>/dev/null || echo 0.0.0).dev
|
||||
fi
|
||||
echo "version=$newVersion" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
docker build -t git.arindy.de/arindy/latex-runner:${{ steps.version.outputs.version }} .
|
||||
|
||||
- name: Push
|
||||
if: ${{ github.ref_type == 'tag' }}
|
||||
run: |
|
||||
echo ${{secrets.PACKAGES_TOKEN}} | docker login --username ${{ secrets.PACKAGES_USER }} --password-stdin git.arindy.de
|
||||
docker push git.arindy.de/arindy/latex-runner:${{ steps.version.outputs.version }}
|
||||
Reference in New Issue
Block a user