Skip to content

swamilin is testing out GitHub Actions πŸš€ #1

swamilin is testing out GitHub Actions πŸš€

swamilin is testing out GitHub Actions πŸš€ #1

name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions πŸš€
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run a one-line script
run: docker run zyclonite/sysbench cpu run
- name: Run a multi-line scripts
run: |
ls
pwd
hostname
cat /etc/os-release
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow in Another Repository
run: |
repo_owner="SiliconLabsSoftware"
repo_name="devops_test"
event_type="trigger-workflow"
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/SiliconLabsSoftware/devops_test/dispatches \
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"unit\": false, \"integration\": true}}"