Skip to content

Instantly share code, notes, and snippets.

@KEINOS
Created May 24, 2023 12:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KEINOS/ca186b6f1b384e231d93529b919203ee to your computer and use it in GitHub Desktop.
Save KEINOS/ca186b6f1b384e231d93529b919203ee to your computer and use it in GitHub Desktop.
[Memo] CheatSheet for GitHub Actions Job step versions
steps:
  - uses: actions/checkout@v3
steps:
  - uses: actions/cache@v3
steps:
  - uses: KEINOS/gh-action-hash-for-cache@main
    id: imagetag
    # Udate the hash if any file in the path has changed or the month has changed.
    with:
      path: |
        ./go.mod
        ./go.sum
        ./docker-compose.yml
      variant: $(TZ=UTC-9 date '+%Y%m')
steps:
  - uses: actions/setup-go@v4
    with:
      go-version: '1'
      check-latest: true
      cache: true
steps:
  - uses: github/codeql-action/init@v2
    with:
      languages: go
  - uses: github/codeql-action/analyze@v2
steps:
  - uses: peter-evans/create-pull-request@v5
    with:
        token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
steps:
  - uses: codecov/codecov-action@v3
    with:
      token: ${{ secrets.CODECOV_TOKEN }}
      files: ./coverage1.xml,./coverage2.xml # optional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment