workflows badge

Actions Status

Actions Status

Actions Status

Actions Status

general

  • flow : event trigger -> virtual machine -> clone source code -> do something
  • price : https://github.com/features/actions#pricing-details

folder 結構

|-- hello-world (repository)
|   |__ .github
|       └── workflows
|           └── my-first-workflow.yml
|       └── actions
|           |__ hello-world-action
|               └── action.yml

ex : base example

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      # This step checks out a copy of your repository.
      - uses: actions/checkout@v1
      # This step references the directory that contains the action.
      - uses: ./.github/actions/hello-world-action

ex : action, 取得 repo source code

  • 在 github action 的 virtual machine 中, 是空的 instance, 需要透過 git 下載 source code
  • 可以使用已經建立好的 action 透過 checkout 來獲取 repo 的 source code
- name: Check out code into the Go module directory
    uses: actions/checkout@v1

Q