be more 'impact' #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Resume | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'resume/resume.tex' | |
- 'resume/VERSION_RESUME' | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Get version | |
id: version | |
run: | | |
echo "image_version=$(cat resume/VERSION)" >> $GITHUB_ENV | |
echo "resume_version=$(cat resume/VERSION_RESUME)" >> $GITHUB_ENV | |
- name: Build | |
id: build | |
uses: addnab/docker-run-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
image: dolfolife/latex:${{ env.image_version }} | |
options: -v ${{ github.workspace }}/resume:/resume --net=none | |
shell: bash | |
run: | | |
echo "Running Script" | |
pushd /resume | |
pdflatex resume.tex && pdflatex resume.tex | |
popd | |
- name: Create Tag | |
id: tag | |
env: | |
tag: "resume/v${{ env.resume_version }}" | |
run: | | |
git tag $tag | |
git push --tags | |
echo "tag=$tag" >> $GITHUB_ENV | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Resume v${{ env.resume_version }} | |
tag_name: ${{ env.tag }} | |
files: ${{ github.workspace }}/resume/resume.pdf | |
token: ${{ secrets.GITHUB_TOKEN }} |