├── README.md └── .github └── workflows ├── 4-free-mac.yml ├── 3-qod.yml ├── 1-list-hardware.yml └── 2-ghpages.yml /README.md: -------------------------------------------------------------------------------- 1 | # actions-demo -------------------------------------------------------------------------------- /.github/workflows/4-free-mac.yml: -------------------------------------------------------------------------------- 1 | name: 4 - Free Mac 2 | on: 3 | workflow_dispatch: 4 | 5 | jobs: 6 | build: 7 | runs-on: macos-latest 8 | steps: 9 | - name: Setup tmate session 10 | uses: mxschmitt/action-tmate@v2 11 | -------------------------------------------------------------------------------- /.github/workflows/3-qod.yml: -------------------------------------------------------------------------------- 1 | name: Quote of the day 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | qod: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - run: | 11 | QUOTE=$(curl -s http://api.quotable.io/random | jq '"\(.content) - _\(.author)_"') 12 | curl -s -X POST "${{ secrets.WEBHOOK_URL }}" -d "content=$QUOTE" 13 | -------------------------------------------------------------------------------- /.github/workflows/1-list-hardware.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: List Hardware 4 | 5 | # Controls when the action will run. 6 | on: 7 | # Allows you to run this workflow manually from the Actions tab 8 | workflow_dispatch: 9 | 10 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 11 | jobs: 12 | # This workflow contains a single job called "build" 13 | list-hardware: 14 | # The type of runner that the job will run on 15 | runs-on: ubuntu-latest 16 | 17 | # Steps represent a sequence of tasks that will be executed as part of the job 18 | steps: 19 | - run: sudo lshw -short 20 | -------------------------------------------------------------------------------- /.github/workflows/2-ghpages.yml: -------------------------------------------------------------------------------- 1 | 2 | # This is a basic workflow to help you get started with Actions 3 | 4 | name: List Hardware and Push HTML page to GitHub Pages 5 | 6 | # Controls when the action will run. 7 | on: 8 | # Allows you to run this workflow manually from the Actions tab 9 | workflow_dispatch: 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | list-hardware: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | 18 | # Steps represent a sequence of tasks that will be executed as part of the job 19 | steps: 20 | - name: Checkout Repository 21 | uses: actions/checkout@v2 22 | - run: sudo lshw -html > ./index.html 23 | - name: Deploy to GitHub Pages 24 | uses: peaceiris/actions-gh-pages@v3 25 | with: 26 | github_token: ${{ secrets.GITHUB_TOKEN }} 27 | publish_dir: ./ 28 | --------------------------------------------------------------------------------