-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Too many new actions #2
Merged
Merged
Changes from 4 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
8f67939
WIP - cljfmt actions
bltavares 0b06b7d
Update cljfmt/Dockerfile
bltavares 91bb263
Update cljfmt/README.md
bltavares 8f9c101
Update cljfmt/entrypoint.sh
bltavares 0b6283e
Update cljfmt/Dockerfile
bltavares 185e318
Update entrypoint.sh
bltavares 3dd2d22
Update entrypoint.sh
bltavares 32c2d85
Update entrypoint.sh
bltavares 0474363
Checkout properly
bltavares 386fcd2
Pull Request Review
bltavares 5132ba0
wip
bltavares c5a3120
Fix checks for dirty commit
bltavares cbad246
Bogus username
bltavares 0ea2c7e
Uses Github API to create commits
bltavares f99a791
Fix path
bltavares 4bddd21
Post content of tree
bltavares 3d8c3b1
Encode into base64
bltavares 9399e57
Skip with exit code
bltavares e468cd2
Remove linebreak
bltavares e703904
Upload blobs encoded
bltavares db6881f
Fix spacing
bltavares 1806a9d
Point to blobs
bltavares c77fbd4
fix quoting
bltavares c15ee35
Adds shellcheck action
bltavares 9bf0216
Introduces hadolint
bltavares 4a3d4ea
Fix path to lib.sh
bltavares 87051da
Debug
bltavares 9d51062
Fix check for github token
bltavares 606b235
Adjust commit message
bltavares acdd27c
Allow using the action name or fallback to cljfmt
bltavares c8a8aeb
Documentation
bltavares c54c5b8
Adds shfmt
bltavares 109755d
More flags
bltavares cd69dbb
Improve workflow
bltavares 98f3f52
typo
bltavares c8e2836
Another type
bltavares 77f60e6
Apply shfmt
bltavares b50b919
Adds powershell formatter
bltavares b287d65
Documentation
bltavares 1b11fa3
Markdown linting
bltavares File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,8 @@ | ||
# actions | ||
|
||
|
||
```bash | ||
action=$(jq --raw-output .action "$GITHUB_EVENT_PATH") | ||
pr_url=$(jq --raw-output .pull_request.url "$GITHUB_EVENT_PATH") | ||
``` | ||
# clojure-playground |
Binary file not shown.
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,20 @@ | ||
FROM clojure:lein-alpine | ||
|
||
RUN apk --no-cache add \ | ||
curl \ | ||
jq \ | ||
ca-certificates \ | ||
bash \ | ||
git | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
CMD ["/entrypoint.sh"] | ||
|
||
LABEL "com.github.actions.name"="cljfmt" | ||
LABEL "com.github.actions.description"="Provides linting and fixes using cljfmt" | ||
LABEL "com.github.actions.icon"="bot" | ||
bltavares marked this conversation as resolved.
Show resolved
Hide resolved
|
||
LABEL "com.github.actions.color"="green" | ||
|
||
LABEL "repository"="http://github.com/bltavares/actions" | ||
LABEL "homepage"="http://github.com/bltavares/actions" | ||
LABEL "maintainer"="Bruno Tavares <[email protected]>" |
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,12 @@ | ||
|
||
```hcl | ||
workflow "on push" { | ||
on = "push" | ||
resolves = ["cljfmt lint"] | ||
} | ||
|
||
action "cljfmt lint" { | ||
uses = "bltavares/actions/cljfmt@master" | ||
secrets = ["GITHUB_TOKEN"] | ||
} | ||
``` |
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,28 @@ | ||
#!/bin/bash | ||
|
||
set -eo pipefail | ||
|
||
fix() { | ||
lein cljfmt fix | ||
|
||
[[ -z $(git status -s) ]] && { | ||
git config credential.helper 'cache --timeout=120' | ||
git config user.email "[email protected]" | ||
git config user.name "cljfmt fix" | ||
git add . | ||
git commit -m "Apply cljfmt fix" | ||
git push -q https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git ${GITHUB_REF} | ||
} | ||
} | ||
|
||
main() { | ||
[[ -z "$GITHUB_TOKEN" ]] && echo "Set the GITHUB_TOKEN env variable." && exit 1 | ||
|
||
if [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then | ||
lein cljfmt check | ||
elif [[ "$GITHUB_EVENT_NAME" == "issue_comment" ]]; then | ||
fix | ||
fi | ||
} | ||
|
||
main |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check which actions are available