Skip to content

hchiam/learning-github-actions

Repository files navigation

Learning GitHub Actions

Just one of the things I'm learning. https://github.com/hchiam/learning

Testing out markdown-link-check on this repo:

https://github.com/gaurav-nelson/github-action-markdown-link-check

https://github.com/marketplace/actions/markdown-link-check

Setup

mkdir .github && mkdir .github/workflows && touch .github/workflows/action.yml

Then edit action.yml

When you push, you'll see results here: https://github.com/hchiam/learning-github-actions/actions

More info: https://docs.github.com/en/free-pro-team@latest/actions/quickstart

Intentionally broken link: https://github.com/hchiam/learning-github-actions/actionsy

Example output

Successfully detected broken link in README.md!

Learn more

https://docs.github.com/en/actions/quickstart

https://docs.github.com/en/actions/reference/events-that-trigger-workflows

https://github.com/marketplace/actions/cypress-io

Replace Travis CI with GitHub Actions

All you have to do is add a .github/workflows/some_file_name.yml file to your GitHub repo! For example:

name: GitHub Actions Demo

on:
  pull_request:
    types: [review_requested]

jobs:
  Example-GitHub-Action-Name:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2 # this will use https://github.com/actions/checkout
      # - run: npm run some-script
      - name: Cypress run
        uses: cypress-io/github-action@v2 # this will use https://github.com/cypress-io/github-action

#2

https://github.com/hchiam/learning-github-actions/runs/2472169652

https://github.com/hchiam/slides/blob/952dcc8bb5c756aaaf9c7235723ce4a8e3f5ee0d/.github/workflows/run_cypress_tests.yml#L15

A more recent example

https://github.com/hchiam/test-blingblingjs/blob/main/.github/workflows/main.yml

on: [push, pull_request]

About

Learning GitHub Actions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published