Skip to content

Commit

Permalink
Sh/action.yml (#5)
Browse files Browse the repository at this point in the history
* Add action.yml (from Simen)

* update action.yml with args

* add workflow

* move workflow to github folder

* add example wf using action

Co-authored-by: Otto Lote <[email protected]>

* move github folder into docs folder

---------

Co-authored-by: Otto Lote <[email protected]>
  • Loading branch information
sshjelle and ottolote authored May 14, 2024
1 parent 4ef0351 commit 94ef8cd
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 0 deletions.
35 changes: 35 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: 'markdown2confluence'
description: 'Publish markdown files to Confluence'
inputs:
CONFLUENCE_USERNAME:
description: 'Confluence username'
required: true
CONFLUENCE_PASSWORD:
description: 'Confluence password or API token'
required: true
CONFLUENCE_URL:
description: 'URL to your confluence instance, e.g https://{example}.atlassian.net/wiki'
required: true
CONFLUENCE_SPACE_ID:
description: 'Confluence space ID'
required: true
CONFLUENCE_PARENT_PAGE_ID:
description: 'ID of the confluence parent page where the markdown files will be published under'
required: true
MARKDOWN_FOLDER:
description: 'Path to the folder containing the markdown files to be published. Set to root (./) if all markdown files in your repo should be published.'
required: false

runs:
using: 'docker'
image: 'docker://ghcr.io/innofactororg/markdown2confluence:0.1.0'
env:
CONFLUENCE_USERNAME: ${{ inputs.CONFLUENCE_USERNAME }}
CONFLUENCE_PASSWORD: ${{ inputs.CONFLUENCE_PASSWORD }}
CONFLUENCE_URL: ${{ inputs.CONFLUENCE_URL }}
CONFLUENCE_SPACE_ID: ${{ inputs.CONFLUENCE_SPACE_ID }}
CONFLUENCE_PARENT_PAGE_ID: ${{ inputs.CONFLUENCE_PARENT_PAGE_ID }}
MARKDOWN_FOLDER: ${{ inputs.MARKDOWN_FOLDER }}
args:
- python
- /app/main.py
23 changes: 23 additions & 0 deletions docs/github/md2confluence.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: markdown2Confluence
# on:
# push:
# branches:
# paths:
jobs:
markdown2Confluence:
name: markdown2Confluence-${{ github.event.repository.updated_at}}
runs-on: ubuntu-latest
container: ghcr.io/innofactororg/markdown2confluence:0.1.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run markdown2confluence container
run: python /app/main.py
env:
CONFLUENCE_USERNAME: ${{ vars.CONFLUENCE_USERNAME }}
CONFLUENCE_PASSWORD: ${{ secrets.CONFLUENCE_PASSWORD }}
CONFLUENCE_URL: 'https://sshjelle.atlassian.net/wiki/rest/api/'
CONFLUENCE_SPACE_ID: 'TSTmarkdow'
CONFLUENCE_PARENT_PAGE_ID: '65777'
MARKDOWN_FOLDER: './markdown2confluence'

24 changes: 24 additions & 0 deletions docs/github/md2confluenceUsingAction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

name: markdown2ConfluenceUsingAction
# on:
# push:
# branches:
# paths:

jobs:
markdown2Confluence:
name: action-${{ github.event.repository.updated_at}}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run action
uses: innofactororg/markdown2confluence@action/1.0.10
with:
CONFLUENCE_USERNAME: ${{ vars.CONFLUENCE_USERNAME }}
CONFLUENCE_PASSWORD: ${{ secrets.CONFLUENCE_PASSWORD }}
CONFLUENCE_URL: 'https://sshjelle.atlassian.net/wiki/rest/api/'
CONFLUENCE_SPACE_ID: 'TSTmarkdow'
CONFLUENCE_PARENT_PAGE_ID: '65777'
MARKDOWN_FOLDER: './markdown2confluence'

0 comments on commit 94ef8cd

Please sign in to comment.