diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..989eaf396 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,11 @@ +on: + push: + branches: + - main + +jobs: + hello_world: + runs-on: ubuntu-latest + steps: + - name: Echo current time + run: echo "The current server time is $(date)" diff --git a/github-actions/.github/workflows/.keep b/github-actions/.github/workflows/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/github-actions/.github/workflows/actions.yml b/github-actions/.github/workflows/actions.yml new file mode 100644 index 000000000..5ced5076f --- /dev/null +++ b/github-actions/.github/workflows/actions.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-actions/.github/workflows/manua.yml b/github-actions/.github/workflows/manua.yml new file mode 100644 index 000000000..5ced5076f --- /dev/null +++ b/github-actions/.github/workflows/manua.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