Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/2nd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 2nd Workflow
on: workflow_dispatch
jobs:
first-job:
runs-on: ubuntu-latest
steps:
- name: print greeting
run: |
echo " GITHUB ACTIONS "
echo " Good Bye"
29 changes: 29 additions & 0 deletions .github/workflows/S3copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Copy Files between S3 Buckets

on:
workflow_dispatch:


jobs:
copy-files:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Copy Files
run: |
# Define your source and target S3 bucket paths
SOURCE_BUCKET="s3://ghtestworkflow/pipeline.PNG"
TARGET_BUCKET="s3://ghworkflow1/foldertest/"

# Use AWS CLI to copy files from source to target
aws s3 cp $SOURCE_BUCKET $TARGET_BUCKET --recursive
2 changes: 1 addition & 1 deletion .github/workflows/cherrypick_PR.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Cherry-Pick and Raise PR
name: Cherry-Pick Commits
on:
push:
branches:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/ghpat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Use GH_PAT Secret

on:
push:
branches:
- main

jobs:
create-issue:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Create Issue
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
# Use the GH_PAT secret to create an issue
curl -X POST -H "Authorization: token $GH_PAT" \
-d '{"title":"New Issue Created by Workflow", "body":"This issue is created using a GitHub Actions workflow."}' \
https://api.github.com/repos/${{ github.repository }}/issues
35 changes: 35 additions & 0 deletions .github/workflows/jsonread.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Extract JSON Values

on:
push:
branches:
- main

jobs:
extract-values:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Read JSON file
run: |
json_data=$(cat input/input.json)
echo "::set-output name=json_data::$json_data"

- name: Extract values from JSON
id: extract
run: |
name=$(echo "$json_data" | jq -r '.name')
age=$(echo "$json_data" | jq -r '.age')
car=$(echo "$json_data" | jq -r '.car')
echo "::set-output name=name::$name"
echo "::set-output name=age::$age"
echo "::set-output name=car::$car"

- name: Display extracted values
run: |
echo "Name: ${{ steps.extract.outputs.name }}"
echo "Age: ${{ steps.extract.outputs.age }}"
echo "Car: ${{ steps.extract.outputs.car }}"
1 change: 1 addition & 0 deletions ghtest
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test file GHpat test
3 changes: 3 additions & 0 deletions input/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'{"name":"John",
"age":30,
"car":null}'