diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 000000000..5ced5076f --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,32 @@ +name: Manual Trigger with Params + +on: + workflow_dispatch: + inputs: + name: + description: "Name of the person to greet" + required: true + type: string + greeting: + description: "Type of greeting" + required: true + type: string + data: + description: "Base64 encoded content of a file" + required: false + type: string + +jobs: + greet: + runs-on: ubuntu-latest + steps: + - name: Decode File Content + run: | + echo "${{ inputs.data }}" | base64 --decode > ./decoded_file.txt + - name: Display Greeting + run: | + echo "${{ inputs.greeting }}, ${{ inputs.name }}!" + - name: Display File Content + run: | + echo "Contents of the file:" + cat ./decoded_file.txt diff --git a/.github/workflows/multi-event.yml b/.github/workflows/multi-event.yml new file mode 100644 index 000000000..12d8f36fa --- /dev/null +++ b/.github/workflows/multi-event.yml @@ -0,0 +1,20 @@ +on: + push: + branches: + - main + # - dev + pull_request: + branches: + - main + +jobs: + hello_world: + runs-on: windows-latest + steps: + - name: "Echo Basic Information" + run: | + + echo "REF: $env:GITHUB_REF" + echo "Job ID: $env:GITHUB_JOB" + echo "Action: $env:GITHUB_ACTION" + echo "Actor: $env:GITHUB_ACTOR" diff --git a/.github/workflows/schedule.yml b/.github/workflows/schedule.yml new file mode 100644 index 000000000..3554e7c3f --- /dev/null +++ b/.github/workflows/schedule.yml @@ -0,0 +1,10 @@ +on: + schedule: + - cron: "*/1 * * * *" + +jobs: + hello_world: + runs-on: windows-latest + steps: + - name: Echo current time + run: echo "the current server time is $(Get-Date)" diff --git a/README.md b/README.md index 43fc9143d..9b43e9835 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # Github-Examples + A repo containing GitHub for programmatic examples +"mohamed test" diff --git a/github-actions/templates/manual.yml b/github-actions/templates/manual.yml index 081adf3a6..5ced5076f 100644 --- a/github-actions/templates/manual.yml +++ b/github-actions/templates/manual.yml @@ -4,15 +4,15 @@ on: workflow_dispatch: inputs: name: - description: 'Name of the person to greet' + description: "Name of the person to greet" required: true type: string greeting: - description: 'Type of greeting' + description: "Type of greeting" required: true type: string data: - description: 'Base64 encoded content of a file' + description: "Base64 encoded content of a file" required: false type: string @@ -29,4 +29,4 @@ jobs: - name: Display File Content run: | echo "Contents of the file:" - cat ./decoded_file.txt \ No newline at end of file + cat ./decoded_file.txt diff --git a/myData.json b/myData.json new file mode 100644 index 000000000..458b122e6 --- /dev/null +++ b/myData.json @@ -0,0 +1,2 @@ +// { "hello": "mohamed" } +eyAiaGVsbG8iOiAibW9oYW1lZCIgfQ0K \ No newline at end of file