Skip to content

Merge pull request #7 from piniom/reduce-text #51

Merge pull request #7 from piniom/reduce-text

Merge pull request #7 from piniom/reduce-text #51

Workflow file for this run

name: Create Release
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: piniom/nspyc-pandoc
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set Date Now
run: bash set_date_now.sh
- name: Set up Docker
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: piniom
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Run Container and Generate PDF
run: docker run -v ${{ github.workspace }}/output:/data/output ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
- name: Extract release version
id: extract_value
run: |
RELEASE_VERSION=$(grep 'subtitle:' convention.md | awk '{print $NF}')
echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ secrets.RELEASE_TOKEN }}
prerelease: false
automatic_release_tag: ${{ github.ref_name }}-${{ env.RELEASE_VERSION }}
files: |
output/convention.pdf