From 8f91d7b3db5a2e8ba45b7c498b65d04a5ae48321 Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan <159180023+sarathrajsrinivasan@users.noreply.github.com> Date: Fri, 24 May 2024 15:16:30 -0500 Subject: [PATCH] Create github-actions-1-demo.yml --- .github/workflows/github-actions-1-demo.yml | 66 +++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/github-actions-1-demo.yml diff --git a/.github/workflows/github-actions-1-demo.yml b/.github/workflows/github-actions-1-demo.yml new file mode 100644 index 0000000..e2a74b4 --- /dev/null +++ b/.github/workflows/github-actions-1-demo.yml @@ -0,0 +1,66 @@ +name: GitHub Actions Demo + +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 + +on: [push, workflow_dispatch] # we can add multiple event triggers like this. workflow_dispatch --> means manual trigger. + +# We can also skip triggering the actions by mentioning [skip actions] / [skip ci] in the commit message +# +# on: +# push: +# branches: --> Here we have options such as : branches / tags / branches-ignore / tags-ignore +# - main +# - 'dev-*' --> Single * means any characters other than slashes. Eg: dev-new / dev-old +# - 'feature/**' --> Double * means all characters including further slashes. Eg: feature/new/button +# paths-ignore: --> Helpful to add either path to ignore or path to monitor. +# - '.github/workflows/*' + +# on: +# pull_request: +# types: [opened, reopened] + +# on: +# pull_request: +# types: +# - opened +# - edited +# workflow_dispatch: --> Note: here we need to add ":" eventhough we dont have anything to add more to it. + +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 }}." + +##################################################################################################################### + +# Workflow Triggers for Github Actions: on: [push] +# ===================================== +# These triggers allow you to automate workflows based on various events that occur within your GitHub repository, +# enabling continuous integration, continuous deployment, and other automation tasks. +# +# Trigger Description +# ------------------------------------- +# push Triggers the workflow when changes are pushed to the repository. +# pull_request Triggers the workflow when a pull request is opened, updated, or synchronized. +# schedule Triggers the workflow at scheduled intervals. +# workflow_dispatch Allows the workflow to be manually triggered from the GitHub Actions tab. +# repository_dispatch Triggers the workflow when a repository dispatch event is triggered. +# issue_comment Triggers the workflow when an issue comment is created, edited, or deleted. +# issues Triggers the workflow when an issue is opened, edited, or deleted. +# pull_request_review Triggers the workflow when a pull request review is submitted, edited, or dismissed. +# pull_request_target Triggers the workflow on pull requests from forked repositories. +# push_to_delete Triggers the workflow when a branch or tag is deleted. +# registry_package Triggers the workflow when a package is published, updated, or deleted in a GitHub Packages registry repository. + +#####################################################################################################################