Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New workflow for publishing to Confluence #46

Closed
wants to merge 76 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
71051d3
adding new workflow for publishing to Confluence
villyes-ledger Sep 18, 2024
8dcad9e
Replacing username with variable
villyes-ledger Sep 18, 2024
bf66e39
Attempt to fix error re. markdown-confluence/publish
villyes-ledger Sep 18, 2024
f946a3b
Attempt to fix errors related to node versions
villyes-ledger Sep 18, 2024
c1ad99f
Attempt2 to fix errors re. node
villyes-ledger Sep 18, 2024
78306c9
Changing env back to string
villyes-ledger Sep 18, 2024
2f12d3b
Updated checkout version + added setup-node
villyes-ledger Sep 20, 2024
135f9fe
Updated contentRoot to fix error
villyes-ledger Sep 20, 2024
5b5c516
Updated contentRoot to fix error 2
villyes-ledger Sep 20, 2024
528aecc
Removing redundant env stuff
villyes-ledger Sep 20, 2024
63ecfae
Updated folderToPublish to fix error
villyes-ledger Sep 20, 2024
f57e1df
Fixing file naming conflict
villyes-ledger Sep 24, 2024
b54fb3c
Fixing file naming conflict
villyes-ledger Sep 24, 2024
678d0e0
Added symbolic link
villyes-ledger Sep 24, 2024
2971fb9
Added symbolic link
villyes-ledger Sep 24, 2024
27df7ff
Added symbolic link
villyes-ledger Sep 24, 2024
116b790
Added symbolic link
villyes-ledger Sep 24, 2024
6af5dad
Fixing unique file names issue
villyes-ledger Oct 1, 2024
d06d4fd
Attempt 2 to fix unique file names issue
villyes-ledger Oct 1, 2024
1c212ab
Test: Removed para tag from table cell
villyes-ledger Oct 2, 2024
e32f205
Test: specified single file as contentRoot
villyes-ledger Oct 2, 2024
d7b96bf
Test: specified multiple folders as arrays for contentRoot
villyes-ledger Oct 2, 2024
42b480c
Test: specified multiple folders as arrays for contentRoot
villyes-ledger Oct 2, 2024
e9f00b4
Test: specified multiple publish workflows
villyes-ledger Oct 2, 2024
5ceb8fc
Test: add test updates to see if the p tags come back
villyes-ledger Oct 2, 2024
6171676
Replace text test
villyes-ledger Oct 12, 2024
2bcd762
Replace text test
villyes-ledger Oct 12, 2024
4a2e9ea
Replace text test
villyes-ledger Oct 12, 2024
53bdf1c
Replace text test
villyes-ledger Oct 12, 2024
fccc6b7
Replace text test
villyes-ledger Oct 12, 2024
88fc68b
Replace text test
villyes-ledger Oct 12, 2024
27b5312
Rename file test
villyes-ledger Oct 12, 2024
43cf986
Replace text test
villyes-ledger Oct 12, 2024
08e21b8
Replace text and rename file test
villyes-ledger Oct 12, 2024
b4de6b3
Replace text and rename file test
villyes-ledger Oct 12, 2024
444d205
Replace text and rename file test
villyes-ledger Oct 12, 2024
f826ba6
Replace text and rename file test
villyes-ledger Oct 12, 2024
26ff124
Replace text and rename file test
villyes-ledger Oct 12, 2024
ff11ced
Replace text and rename file test
villyes-ledger Oct 12, 2024
1b95bb7
Replace text and rename file test
villyes-ledger Oct 12, 2024
c6c7b94
Replace text and rename file test
villyes-ledger Oct 12, 2024
284b268
Replace text and rename file test
villyes-ledger Oct 12, 2024
65b5758
Replace text and rename file test
villyes-ledger Oct 12, 2024
0dd5322
Replace text and rename file test
villyes-ledger Oct 14, 2024
26b011f
Rename file test
villyes-ledger Oct 14, 2024
1a2acc9
Replace text test
villyes-ledger Oct 14, 2024
9615bcd
Rename file
villyes-ledger Oct 14, 2024
a8412b1
Rename file
villyes-ledger Oct 14, 2024
b3e3177
Rename file
villyes-ledger Oct 14, 2024
e6125b9
Rename file test
villyes-ledger Oct 14, 2024
5ac2ab1
Rename file test
villyes-ledger Oct 14, 2024
cca128b
Rename file
villyes-ledger Oct 14, 2024
c34bef9
Rename file
villyes-ledger Oct 14, 2024
35a0fca
Rename file
villyes-ledger Oct 14, 2024
8e7734a
Rename file
villyes-ledger Oct 14, 2024
7119a2b
Rename file
villyes-ledger Oct 14, 2024
ed7cc7a
Rename file
villyes-ledger Oct 14, 2024
1921316
Rename file
villyes-ledger Oct 14, 2024
5170278
Rename file
villyes-ledger Oct 14, 2024
fa4430d
Rename file
villyes-ledger Oct 14, 2024
b4411d0
Replace text test
villyes-ledger Oct 14, 2024
799cf7b
Replace text test
villyes-ledger Oct 14, 2024
a9fa274
Replace text test
villyes-ledger Oct 14, 2024
38e6638
Replace text test
villyes-ledger Oct 15, 2024
a1ce102
Replace text test
villyes-ledger Oct 15, 2024
52c28b5
Replace text test
villyes-ledger Oct 15, 2024
222d68b
Replace text test
villyes-ledger Oct 15, 2024
60737f7
Replace text test
villyes-ledger Oct 15, 2024
4db32b2
Updated file renaming logic
villyes-ledger Nov 3, 2024
930a37d
Updated comment replacing logic
villyes-ledger Nov 3, 2024
968c97c
Updated file renaming logic
villyes-ledger Nov 3, 2024
5dc67ea
Updated file renaming logic and comment replacement logic
villyes-ledger Nov 3, 2024
75d7d0c
Added one-size-fits-all workflow
villyes-ledger Nov 3, 2024
b7b9db6
Fixed typo in command
villyes-ledger Nov 3, 2024
796ce07
Removed generic workflow and testing para tag removal
villyes-ledger Nov 3, 2024
b9016f3
Added workflows for para tag removal
villyes-ledger Nov 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/publish_attest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to Confluence
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Rename all .md files
run: find . -depth -name "*.md" -exec sh -c 'f="{}"; mv -- "$f" "$(dirname "$f")/attest_$(basename "$f")"' \;

- name: Replace comments with a space
run: find . -type f -name "*.md" -exec sed -i 's/<!--.*-->/ /g' {} +

- name: Remove <p> and </p> tags
run: find . -type f -name "*.md" -exec sed -i 's/<\/\?p>//g' {} +

- name: Publish Markdown to Confluence
uses: markdown-confluence/publish-action@v5
with:
confluenceBaseUrl: https://ledgerhq.atlassian.net/
confluenceParentId: 5036769289
atlassianUserName: ${{ secrets.ATLASSIAN_USERNAME }}
atlassianApiToken: ${{ secrets.ATLASSIAN_API_TOKEN }}
folderToPublish: .
contentRoot: actions/attest/
#configFile: .markdown-confluence.json
31 changes: 31 additions & 0 deletions .github/workflows/publish_jfrog_login.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to Confluence
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Rename all .md files
run: find . -depth -name "*.md" -exec sh -c 'f="{}"; mv -- "$f" "$(dirname "$f")/jfrog_login_$(basename "$f")"' \;

- name: Replace comments with a space
run: find . -type f -name "*.md" -exec sed -i 's/<!--.*-->/ /g' {} +

- name: Remove <p> and </p> tags
run: find . -type f -name "*.md" -exec sed -i 's/<\/\?p>//g' {} +

- name: Publish Markdown to Confluence
uses: markdown-confluence/publish-action@v5
with:
confluenceBaseUrl: https://ledgerhq.atlassian.net/
confluenceParentId: 5036769289
atlassianUserName: ${{ secrets.ATLASSIAN_USERNAME }}
atlassianApiToken: ${{ secrets.ATLASSIAN_API_TOKEN }}
folderToPublish: .
contentRoot: actions/jfrog-login/
#configFile: .markdown-confluence.json
31 changes: 31 additions & 0 deletions .github/workflows/publish_sign_blob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to Confluence
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Rename all .md files
run: find . -depth -name "*.md" -exec sh -c 'f="{}"; mv -- "$f" "$(dirname "$f")/sign_blob_$(basename "$f")"' \;

- name: Replace comments with a space
run: find . -type f -name "*.md" -exec sed -i 's/<!--.*-->/ /g' {} +

- name: Remove <p> and </p> tags
run: find . -type f -name "*.md" -exec sed -i 's/<\/\?p>//g' {} +

- name: Publish Markdown to Confluence
uses: markdown-confluence/publish-action@v5
with:
confluenceBaseUrl: https://ledgerhq.atlassian.net/
confluenceParentId: 5036769289
atlassianUserName: ${{ secrets.ATLASSIAN_USERNAME }}
atlassianApiToken: ${{ secrets.ATLASSIAN_API_TOKEN }}
folderToPublish: .
contentRoot: actions/sign-blob/
#configFile: .markdown-confluence.json
31 changes: 31 additions & 0 deletions .github/workflows/publish_sign_container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to Confluence
on: push

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Rename all .md files
run: find . -depth -name "*.md" -exec sh -c 'f="{}"; mv -- "$f" "$(dirname "$f")/sign_container_$(basename "$f")"' \;

- name: Replace comments with a space
run: find . -type f -name "*.md" -exec sed -i 's/<!--.*-->/ /g' {} +

- name: Remove <p> and </p> tags
run: find . -type f -name "*.md" -exec sed -i 's/<\/\?p>//g' {} +

- name: Publish Markdown to Confluence
uses: markdown-confluence/publish-action@v5
with:
confluenceBaseUrl: https://ledgerhq.atlassian.net/
confluenceParentId: 5036769289
atlassianUserName: ${{ secrets.ATLASSIAN_USERNAME }}
atlassianApiToken: ${{ secrets.ATLASSIAN_API_TOKEN }}
folderToPublish: .
contentRoot: actions/sign-container/
#configFile: .markdown-confluence.json
16 changes: 8 additions & 8 deletions actions/jfrog-login/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ jobs:

| name | description |
| --- | --- |
| `oidc-token` | <p>OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name.</p> |
| `oidc-user` | <p>Username extracted from the OIDC token during authentication.</p> |
| `jfrog-url` | <p>Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations.</p> |
| `jfrog-domain` | <p>Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations.</p> |
| `oidc-token` | OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name. |
| `oidc-user` | Username extracted from the OIDC token during authentication. |
| `jfrog-url` | Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations. |
| `jfrog-domain` | Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations. |
<!-- action-docs-outputs source="action.yml" -->

Those are also exposed as environment variables:

| name | description |
| --- | --- |
| `JFROG_TOKEN` | <p>OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name.</p> |
| `JFROG_USER` | <p>Username extracted from the OIDC token during authentication.</p> |
| `JFROG_URL` | <p>Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations.</p> |
| `JFROG_DOMAIN` | <p>Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations.</p> |
| `JFROG_TOKEN` | OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name. |
| `JFROG_USER` | Username extracted from the OIDC token during authentication. |
| `JFROG_URL` | Base URL of Ledger's JFrog platform to be used for subsequent API/CLI operations. |
| `JFROG_DOMAIN` | Base domain of Ledger's JFrog platform to be used for subsequent API/CLI operations. |

## Runs

Expand Down
2 changes: 1 addition & 1 deletion actions/jfrog-login/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: |

outputs:
oidc-token:
description: "OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name."
description: "TEST TEST TEST OIDC token generated by JFrog CLI for secure API/CLI interactions, using the Setup JFrog CLI step with the configured oidc-provider-name."
value: ${{ steps.setup-jfrog-cli.outputs.oidc-token }}
oidc-user:
description: "Username extracted from the OIDC token during authentication."
Expand Down