-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into renovate/golang.org-x-term-0.x
- Loading branch information
Showing
46 changed files
with
1,332 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Git Checkout | ||
description: 'Checkout action supporting both github and non github repositories.' | ||
|
||
|
||
inputs: | ||
repository: | ||
description: 'Github repository in the format owner/repo or external http(s) URL' | ||
required: true | ||
ref: | ||
description: 'The branch, tag or SHA to checkout' | ||
default: '' | ||
path: | ||
description: 'Relative path under $GITHUB_WORKSPACE to place the repository' | ||
default: '.' | ||
submodules: | ||
description: 'Whether to checkout submodules. true|false|recursive according to actions/checkout@v4' | ||
default: 'false' | ||
github-server-url: | ||
description: 'The base URL for the GitHub instance that you are trying to clone from' | ||
default: 'https://github.com' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout | ||
shell: bash | ||
run: | | ||
# If URL lacks the protocol, assume it is a github repo | ||
if [[ "${{ inputs.repository }}" =~ https?:// ]] | ||
then | ||
git_url="${{ inputs.repository }}" | ||
else | ||
git_url="${{ inputs.github-server-url }}/${{ inputs.repository }}.git" | ||
fi | ||
# create repo path relative to GITHUB_WORKSPACE as per actions/checkout@v4 | ||
repo_path="$GITHUB_WORKSPACE/${{ inputs.path }}" | ||
# clone the repo and cd into it | ||
git clone $git_url "$repo_path" | ||
cd "$repo_path" | ||
# checkout the correct ref | ||
git config advice.detachedHead false | ||
git checkout ${{ inputs.ref }} | ||
# and update sub modules if required | ||
if ${{ inputs.submodules == 'true' || inputs.submodules == 'recursive' }} | ||
then | ||
git submodule update ${{ inputs.submodules == 'recursive' && '--recursive' || '' }} | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
public.ecr.aws/ubuntu/ubuntu:focal@sha256:036c51fb190af9d3ec7fbd654c2669d5a3da3549aa0e3408b40ba6fb6eb16dfc | ||
public.ecr.aws/ubuntu/ubuntu:focal@sha256:4a885c102bc7de9ff2ffc4b11b65f35e46827d608069cd959181718aa7d14731 |
Oops, something went wrong.