Closed ghost closed 1 year ago
And when I figure this out, could someone guide me on getting dark mode? Thanks!
This is my GitHub Actions file (And you can see the whole file structures here):
name: generate animation
on:
# run automatically every day
schedule:
- cron: "0 6 * * *"
# allows to manually run the job at any time
workflow_dispatch:
# run on every push on the master branch
push:
branches:
- master
jobs:
generate:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
# 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@v2
with:
github_user_name: ${{ github.repository_owner }}
outputs: |
dist/github-snake.svg
dist/github-snake-dark.svg?palette=github-dark
dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9
# 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@v2.5.0
with:
target_branch: output
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
My suggestion is that, to fully understand GitHub Actions, please give a look at the official documentation.
@fky2015 - I’ll try copying that, but ill probably have to change ubuntu because I use macOS, which I believe is darwin?
ill probably have to change ubuntu because I use macOS, which I believe is darwin?
There is no need to do that. These actions only run on GitHub servers.
@fky2015 - Copied and pasted your text into my .yml
file, manually triggered the workflow run and...
another screenshot:
If this helps, I downloaded git using the binary installer for macOS. I tried downloading homebrew and stuff but it took way too long on my machine.
Git version: 2.38.1
macOS Monterey 12.6.2 (stopped receiving software updates due to age) MacBook Air (13-inch, Early 2015) Processor: 1.6 GHz Dual-Core Intel Core i5 Memory: 8 GB 1600 MHz DDR3 Graphics: Intel HD Graphics 6000 1536 MB
I've given this info because I did indeed read the error message
I think you should allow the force push to your GitHub repo.
Edit: I think this is caused by the lack of write permission to your repo.
I think you should allow the force push to your GitHub repo.
How would I do that?
Maybe this would be a help: https://github.com/ad-m/github-push-action/issues/96
Lack of write permission... I'll look at the issue you've linked tomorrow, thank you. Will get back once it works (or fails xD)
EDIT: I'm not sure I want to use the generate-snk anymore, but I want to know the issue and solution (thus I'll look at the issue).
I am not 100% sure if this be of any help. I also failed couple of times and finally got this up. https://github.com/rahulvenugopal/github-snake-help
Hope it helps! You can bypass the git pushes and directly do edits in the repo (not recommended, but for the snake it can be done :smile: Cheers to @fky2015 for all the above troubleshootings
@rahulvenugopal - Thanks for the repo! Unfortunately, it didn't help me. I'll try checking this issue that @fky2015 sent me.
OMGOMGOMGOMG IT WORKED YESS.
Ahem. Basically, nothing was wrong. I'd just had "Workflow permissions" set to "Read only". Smart, I know 🙄. But yeah, thanks to literally everyone who spent hours helping me!!!!! @fky2015 @rahulvenugopal
I thought 4th time would be the charm ðŸ˜
As per the marketplace instructions, I clicked 'Use latest version'. Next, I copied the text it told me to, and headed over to my profile repo. I went to Github Actions and clicked "set up a workflow yourself". I dumped the text into the "main.yml" file and committed the changes. I head back to Actions and get this:
Please help! I do feel instructions could be more detailed/clearer, but maybe it's just me :P