Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/actions/composite/setupGitForOSBotifyApp/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,21 @@ outputs:
runs:
using: composite
steps:
- name: Check if gpg encrypted private key is present
id: key_check
shell: bash
run: |
if [[ -f .github/workflows/OSBotify-private-key.asc.gpg ]]; then
echo "::set-output name=key_exists::true"
fi

- name: Checkout
uses: actions/checkout@v3
if: steps.key_check.outputs.key_exists != 'true'
with:
sparse-checkout: |
.github
Comment on lines +35 to +40
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roryabraham do you know if we need to specify the github token here? Does the default github.token not work?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default token for actions/checkout works 👍🏼

We've never used this sparse-checkout before, but it's a cool way to speed up checkout. will start using everywhere 😈


- name: Decrypt OSBotify GPG key
run: cd .github/workflows && gpg --quiet --batch --yes --decrypt --passphrase=${{ inputs.GPG_PASSPHRASE }} --output OSBotify-private-key.asc OSBotify-private-key.asc.gpg
shell: bash
Expand Down