diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..2e9c71c --- /dev/null +++ b/action.yml @@ -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 diff --git a/docs/github/md2confluence.yml b/docs/github/md2confluence.yml new file mode 100644 index 0000000..c936e91 --- /dev/null +++ b/docs/github/md2confluence.yml @@ -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' + \ No newline at end of file diff --git a/docs/github/md2confluenceUsingAction.yml b/docs/github/md2confluenceUsingAction.yml new file mode 100644 index 0000000..9be1f11 --- /dev/null +++ b/docs/github/md2confluenceUsingAction.yml @@ -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' + \ No newline at end of file