Skip to content

Commit

Permalink
Post word
Browse files Browse the repository at this point in the history
  • Loading branch information
msali123 committed Sep 29, 2023
1 parent c6b375c commit c01cec3
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions blog/_posts/2023-10-03-github-action-triggers.md
Original file line number Diff line number Diff line change
Expand Up @@ -575,13 +575,13 @@ jobs:
- name: Send email
uses: dawidd6/[email protected]
with:
server_address: ${{ secrets.SERVER_ADDRESS }}
server_port: ${{ secrets.SERVER_PORT }}
username: ${{ secrets.MAIL_USERNAME }}
password: ${{ secrets.MAIL_PASSWORD }}
server_address: {% raw %}${{ secrets.SERVER_ADDRESS }}{% endraw %}
server_port: {% raw %}${{ secrets.SERVER_PORT }}{% endraw %}
username: {% raw %}${{ secrets.MAIL_USERNAME }}{% endraw %}
password: {% raw %}${{ secrets.MAIL_PASSWORD }}{% endraw %}
subject: New Tag Created
to: ${{ vars.EMAIL_RECIPIENTS }}
from: ${{ vars.EMAIL_SENDER }}
to: {% raw %}${{ vars.EMAIL_RECIPIENTS }}{% endraw %}
from: {% raw %}${{ vars.EMAIL_SENDER }}{% endraw %}
html_body: file://emails/new_release.html
~~~

Expand Down Expand Up @@ -615,7 +615,7 @@ jobs:
- name: Mark Stale Branches
uses: crs-k/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
days-before-stale: 30
days-before-delete: 90
~~~
Expand Down Expand Up @@ -690,18 +690,18 @@ jobs:
- name: Jira Login
uses: atlassian/gajira-login@v3
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_BASE_URL: {% raw %}${{ secrets.JIRA_BASE_URL }}{% endraw %}
JIRA_USER_EMAIL: {% raw %}${{ secrets.JIRA_USER_EMAIL }}{% endraw %}
JIRA_API_TOKEN: {% raw %}${{ secrets.JIRA_API_TOKEN }}{% endraw %}
# Create the new Jira ticket
- name: Create Jira ticket
id: create_jira_ticket
uses: atlassian/gajira-create@v3
with:
project: TEST
issuetype: ${{ inputs.issuetype }}
summary: ${{ inputs.summary }}
description: ${{ inputs.description }}
issuetype: {% raw %}${{ inputs.issuetype }}{% endraw %}
summary: {% raw %}${{ inputs.summary }}{% endraw %}
description: {% raw %}${{ inputs.description }}{% endraw %}
~~~

This workflow, when executed, creates a Jira task using the provided inputs and secret values. These secret values are inputted in the UI if the workflow is triggered using the `workflow_dispatch` trigger. Following is a screenshot of the UI for this particular workflow:
Expand All @@ -724,12 +724,13 @@ jobs:
# Pass in the path to the workflow file to call
uses: ivankahl/github-actions-demo/.github/workflows/workflow_call_dispatch_create-jira-ticket.yml@master
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_BASE_URL: {% raw %}${{ secrets.JIRA_BASE_URL }}{% endraw %}
JIRA_USER_EMAIL: {% raw %}${{ secrets.JIRA_USER_EMAIL }}{% endraw %}
JIRA_API_TOKEN: {% raw %}${{ secrets.JIRA_API_TOKEN }}{% endraw %}
with:
issuetype: Task
summary: "Review Opened Pull Request: ${{ github.event.pull_request.title }}"
summary: "Review Opened Pull Request: \
{% raw %}${{ github.event.pull_request.title }}{% endraw %}"
~~~

When referring to the workflow to call, you must include the repository name, the path to the workflow file in the repository, and the branch containing the workflow file (in this case, `main`).
Expand Down

0 comments on commit c01cec3

Please sign in to comment.