45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Build and Release PDF
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- "**"
|
|
|
|
jobs:
|
|
builder:
|
|
if: contains(join(github.event.head_commit.modified, ','), '.gitea/Containerfile')
|
|
runs-on: nix
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build Builder Image
|
|
run: |
|
|
buildah bud -f .gitea/Containerfile -t git.karaolidis.com/karaolidis/cv/builder:latest .
|
|
|
|
- name: Push Builder Image
|
|
run: |
|
|
echo "${{ secrets.GITEA_REGISTRY_PASSWORD }}" | buildah login -u "${{ secrets.GITEA_REGISTRY_USER }}" --password-stdin git.karaolidis.com
|
|
skopeo copy \
|
|
containers-storage:git.karaolidis.com/karaolidis/cv/builder:latest \
|
|
docker://git.karaolidis.com/karaolidis/cv/builder:latest
|
|
|
|
release:
|
|
runs-on: nix
|
|
needs: builder
|
|
container:
|
|
image: git.karaolidis.com/karaolidis/cv/builder:latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Compile PDF
|
|
run: xelatex main.tex
|
|
|
|
- name: Release
|
|
uses: https://github.com/akkuman/gitea-release-action@main
|
|
with:
|
|
name: "Release ${{ github.sha }}"
|
|
tag_name: "release-${{ github.sha }}"
|
|
files: main.pdf
|