name: Build and Release PDF on: push: branches: - "**" env: BUILDER_IMAGE: git.karaolidis.com/karaolidis/cv/builder:latest jobs: builder: runs-on: nix steps: - name: Checkout Repository uses: actions/checkout@v3 - name: Pull builder cache run: | buildah pull $BUILDER_IMAGE || true - name: Build Builder Image run: | buildah bud --layers -f .gitea/Containerfile -t $BUILDER_IMAGE . - 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:$BUILDER_IMAGE \ docker://$BUILDER_IMAGE release: runs-on: nix needs: builder container: image: ${{ env.BUILDER_IMAGE }} 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