-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Able to wipe git history for master/main branch #36
Comments
Related #13 |
How would you want me to address this ? As you noticed this action ( Platane/snk ) did not manipulate your git repository. The second one ( crazy-max/ghaction-github-pages) did. There are already comments to explain what each action does. |
I found the way to commit files without overwrite the steps:
+ # checkout output branch
+ - name: checkout output branch
+ uses: actions/checkout@v4
+ with:
+ ref: output
# generates a snake game from a github user (<github_user_name>) contributions graph, output a svg animation at <svg_out_path>
- name: generate github-contribution-grid-snake.svg
uses: Platane/snk/svg-only@v3
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
- dist/github-contribution-grid-snake.svg
- dist/github-contribution-grid-snake-dark.svg?palette=github-dark
./github-contribution-grid-snake.svg
./github-contribution-grid-snake-dark.svg?palette=github-dark
# push the content of <build_dir> to a branch
# the content will be available at https://raw.githubusercontent.com/<github_user>/<repository>/<target_branch>/<file> , or as github page
- name: push github-contribution-grid-snake.svg to the output branch
- uses: crazy-max/ghaction-github-pages@v3.1.0
- with:
- target_branch: output
- build_dir: dist
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: |
+ git config user.name "github-actions[bot]"
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
+ git add .
+ git commit -m "Update github-contribution-grid-snake by [bot]"
+ git push |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This needs to have a warning. The action should not destroy the commit history. Luckily GitHub support was able to recover my last commit.
Example:
The text was updated successfully, but these errors were encountered: