diff --git a/.github/workflows/conditional.yml b/.github/workflows/conditional.yml new file mode 100644 index 000000000..08cab96f3 --- /dev/null +++ b/.github/workflows/conditional.yml @@ -0,0 +1,14 @@ +name: Conditional-workflow +on: [push] +jobs: + hello-world: + if: github.repository == 'git@github.com:selvamsekar66/GH200-Examples' + runs-on: ubuntu-latest + steps: + - name: "Hello World" + run: echo "Hello World!" + goodbye-moon: + runs-on: ubuntu-latest + steps: + - name: "Goodbye Moon" + run: echo "Goodbye Moon!" \ No newline at end of file diff --git a/.github/workflows/custom-action.yml b/.github/workflows/custom-action.yml index 7a87b53f1..5f11648dc 100644 --- a/.github/workflows/custom-action.yml +++ b/.github/workflows/custom-action.yml @@ -1,3 +1,4 @@ +name: Addingname on: [push] jobs: @@ -12,4 +13,5 @@ jobs: name: 'Brown' # Use the output from the `hello` step - name: Get the Output - run: echo "The time was ${{ steps.hello.outputs.greeting }}" \ No newline at end of file + + run: echo "The time was ${{ steps.hello.outputs.greeting }}" diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml new file mode 100644 index 000000000..46774343e --- /dev/null +++ b/.github/workflows/greetings.yml @@ -0,0 +1,16 @@ +name: Greetings + +on: [pull_request_target, issues] + +jobs: + greeting: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/first-interaction@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + issue-message: "Message that will be displayed on users' first issue" + pr-message: "Message that will be displayed on users' first pull request" diff --git a/.github/workflows/multi_event.yml b/.github/workflows/multi_event.yml new file mode 100644 index 000000000..f452e3ae0 --- /dev/null +++ b/.github/workflows/multi_event.yml @@ -0,0 +1,10 @@ +name: Multi Event Example + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Run build step + run: echo "Triggered only on push or pull request" \ No newline at end of file diff --git a/.github/workflows/single_event.yml b/.github/workflows/single_event.yml new file mode 100644 index 000000000..50a300d31 --- /dev/null +++ b/.github/workflows/single_event.yml @@ -0,0 +1,13 @@ +name: Single Event Example + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Run build step + run: echo "Triggered only on push to main branch" \ No newline at end of file diff --git a/.github/workflows/test-schedule.yml b/.github/workflows/test-schedule.yml new file mode 100644 index 000000000..c76abfe34 --- /dev/null +++ b/.github/workflows/test-schedule.yml @@ -0,0 +1,16 @@ +name: Test Schedule Workflows + + +on: + schedule: + - cron : "*/1 * * * *" + workflow_dispatch: + +jobs: + test-job: + runs-on: ubuntu-latest + steps: + - name: show current time + run: | + echo "Workflow triggered at $(date -u)" + echo "Hello from Github actions" \ No newline at end of file