Skip to content

Commit

Permalink
chore(workflow): update action path
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed May 2, 2024
1 parent d6816ec commit c764600
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
31 changes: 0 additions & 31 deletions .github/actions/preview-message-creation/action.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/actions/preview/message/creation/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
###
#
# used action https://github.com/marketplace/actions/github-script
#
###

name: Preview message creation
description: Append a preview url message in the pr body, if not already present

inputs:
access-token:
description: The access_token to use for commenting.
required: true

runs:
using: composite
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ inputs.access-token }}
script: |
const credentials = {
repo: context.repo.repo,
owner: context.repo.owner,
issue_number: context.issue.number
}
const comments = await github.rest.issues.listComments({
...credentials
})
console.log(comments)
8 changes: 5 additions & 3 deletions .github/workflows/build-documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Provide preview message
uses: swisspost/design-system/.github/actions/preview-message-creation

- name: Checkout
uses: actions/checkout@v4

- name: Provide preview message
uses: ./.github/actions/preview/message/creation
with:
access-token: ${{ secrets.SWISSPOSTDEVS_ACCESS_TOKEN }}

- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main

Expand Down

0 comments on commit c764600

Please sign in to comment.