Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doktor-se/gha-checkout
https://github.com/doktor-se/gha-checkout
action actions github-actions
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/doktor-se/gha-checkout
- Owner: Doktor-se
- Created: 2021-12-03T14:23:39.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-16T05:59:05.000Z (almost 2 years ago)
- Last Synced: 2024-10-13T22:17:29.404Z (about 1 month ago)
- Topics: action, actions, github-actions
- Size: 20.5 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gha-checkout
If you are working in a private organisation which uses submodules and/or private github actions its a hassle to checkout.
This is a reusable composite action to reduce copy pasta in your workflows.
This action will (depending on inputs) checkout the appropriate things. If you are using
# Deprecation
Private actions can now be used internally in private organisations.If you don't need submodules update your checkout to just
```yaml
- uses: actions/checkout@v3
```If you need submodules update your workflow to use the normal checkout action
```yaml
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets. }}
submodules: true
```Actions that were previously used with a relative path can be updated to be used like any other action,
that means something like:```yaml
uses: ./.github/composite-actions/some-private-action
```would become
```yaml
uses: /composite-actions/some-private-action@main
```# V3
Uses the same github token to checkout repo, actions, and submodules.
`fetch-depth` can be set, defaults to 1, shallow checkout.```yaml
name: CI
on: pull_requestjobs:
hello-world:
- uses: doktor-se/gha-checkout@v3
with:
token: ${{ secrets.GITHUB_PAT }}- uses: ./.github/composite-actions/some-private-action
- run: echo "hello world"
```# V2
V2 does a shallow checkout of the submodule
If `submodules_key` is not set, submodules will be skipped.
If `actions_key` is not set, private actions will be skipped.```yaml
name: CI
on: pull_requestjobs:
hello-world:
- uses: doktor-se/gha-checkout@v2
with:
submodules_key: ${{ secrets.SSH_SUBMODULES_KEY }}
actions_key: ${{ secrets.SSH_ACTIONS_KEY }}- uses: ./.github/composite-actions/some-private-action
- run: echo "hello world"
```
# V1V1 does a full checkout of the submodule
If `submodules_key` is not set, submodules will be skipped.
If `actions_key` is not set, private actions will be skipped.```yaml
name: CI
on: pull_requestjobs:
hello-world:
- uses: doktor-se/gha-checkout@v1
with:
submodules_key: ${{ secrets.SSH_SUBMODULES_KEY }}
actions_key: ${{ secrets.SSH_ACTIONS_KEY }}- uses: ./.github/composite-actions/some-private-action
- run: echo "hello world"
```