From b5e8fdb9ed9a1306009a53018b2e1a095c60ad3b Mon Sep 17 00:00:00 2001 From: kshitij katiyar <90389917+Kshitij-Katiyar@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:21:33 +0530 Subject: [PATCH 1/4] Create github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/github-actions-demo.yml diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..6ae9e6e --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,19 @@ + +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: [push] +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: List files in the repository + run: | + ls ${{ github.workspace }} + - run: echo "🍏 This job's status is ${{ job.status }}." From fd5cfd8f192e317139b11b70638653bccc0037a2 Mon Sep 17 00:00:00 2001 From: kshitij katiyar <90389917+Kshitij-Katiyar@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:24:36 +0530 Subject: [PATCH 2/4] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 6ae9e6e..74f4c67 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,4 +1,3 @@ - name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] @@ -17,3 +16,5 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." + # Intentionally fail the workflow + - run: exit 1 From 43234607dbdb5eaa94e6f76bb8b9c81ae40221f5 Mon Sep 17 00:00:00 2001 From: kshitij katiyar <90389917+Kshitij-Katiyar@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:30:42 +0530 Subject: [PATCH 3/4] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 74f4c67..15a61d6 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -16,5 +16,3 @@ jobs: run: | ls ${{ github.workspace }} - run: echo "🍏 This job's status is ${{ job.status }}." - # Intentionally fail the workflow - - run: exit 1 From 92d5fc7f6ba16db7a815352d81cf34b0c51bda72 Mon Sep 17 00:00:00 2001 From: kshitij katiyar <90389917+Kshitij-Katiyar@users.noreply.github.com> Date: Tue, 25 Jun 2024 16:45:09 +0530 Subject: [PATCH 4/4] Update github-actions-demo.yml --- .github/workflows/github-actions-demo.yml | 24 ++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml index 15a61d6..2a29777 100644 --- a/.github/workflows/github-actions-demo.yml +++ b/.github/workflows/github-actions-demo.yml @@ -1,18 +1,24 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 -on: [push] +on: [push, pull_request] + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" - - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." + - name: Show trigger event + run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." + - name: Show runner environment + run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" + - name: Show branch and repository info + run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." - name: Check out repository code uses: actions/checkout@v4 - - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." - - run: echo "🖥️ The workflow is now ready to test your code on the runner." + - name: Confirm repository clone + run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + - name: Prepare workflow + run: echo "🖥️ The workflow is now ready to test your code on the runner." - name: List files in the repository - run: | - ls ${{ github.workspace }} - - run: echo "🍏 This job's status is ${{ job.status }}." + run: ls ${{ github.workspace }} + - name: Show job status + run: echo "🍏 This job's status is ${{ job.status }}."