From 2a9a53cbe90dfcbce258f180cfac54b4127bf785 Mon Sep 17 00:00:00 2001 From: Damian Flynn Date: Thu, 1 Dec 2022 22:06:02 +0000 Subject: [PATCH] feat: exposing as action first shot at making this an action may have issues with the run command --- .github/workflows/action.yaml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/action.yaml diff --git a/.github/workflows/action.yaml b/.github/workflows/action.yaml new file mode 100644 index 0000000..bdad652 --- /dev/null +++ b/.github/workflows/action.yaml @@ -0,0 +1,36 @@ +--- +name: 'PyObsidianParser' +description: 'A GitHub Action that takes obsidian notes and prepairs for hugo or other static generators' +inputs: + hugo-content-dir: + description: 'Directory of your Hugo content directory, the obsidian notes should be processed into.' + required: true + obsidian-vault-dir: + description: 'Directory of the Obsidian vault' + required: true + export-dir: + description: 'The Obsidian vault folder the notes should be processed from.' + required: true +# outputs: +# num_squared: +# description: 'Square of the input' +# # need to specify the extra `value` field for `composite` actions +# value: ${{ steps.get-square.outputs.num_squared }} +runs: + using: 'composite' + steps: + - name: Install Python + uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Install Dependencies + run: pip install -r requirements.txt + shell: bash + - name: Export Obsidian Notes + shell: bash + run: | + echo "INPUT_NUM=${{ inputs.num }}" >> $GITHUB_ENV + - name: Fetch the number's square + id: export-notes + shell: bash + run: python main.py --hugo-content-dir ${{ inputs.hugo-content-dir }} --obsidian-vault-dir ${{ inputs.obsidian-vault-dir }} --export-dir ${{ inputs.export-dir }} \ No newline at end of file