Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

GitHub Script with GitHub Actions Automating Workflows

Hello folks,

This is a series of articles where I explain GitHub Script with GitHub Actions and how you can automate publishing data on Atlassian & GitHub Platform based on the results of Workflow.

For example, let us have look at sample workflow.

If the Build is successful, github-actions bot will comment success and if fails it will comment failure.

YAML File under .github/workflows directory in GitHub Repository

name: CI Workflow

on:
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repository
         uses: actions/checkout@v2

     - name: Get Pull Request ID
        run: |
          export PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
          echo "pr_num=$PR_NUMBER" >> $GITHUB_ENV

     - name: Add Comment to Pull Request if Success
        if: ${{ success() }}
        uses: actions/github-script@v5
        with:
          script: |
            await github.rest.issues.createComment({
            owner: context.repo.owner,
            repo: context.repo.repo,
            issue_number: ${{ env.pr_num }},
            body: 'Its Success'
            });

     - name: Add Comment to Pull Request if Failure
        if: ${{ failure() }}
        uses: actions/github-script@v5
        with:
        script: |
          await github.rest.issues.createComment({
          owner: context.repo.owner,
          repo: context.repo.repo,
          issue_number: ${{ env.pr_num }},
          body: 'Its Failure'
          });

This example will get you started with Automations that can be carried out with GitHub Actions and Jira Platform for seamless integration between the applications.

Please follow the link here to know about verified actions available in GitHub Marketplace from Atlassian.

Thanks,
Pramodh

TAGS
AUG Leaders

Atlassian Community Events