yoshi389111 / github-profile-3d-contrib

This GitHub Action creates a GitHub contribution calendar on a 3D profile image.
MIT License
1.05k stars 173 forks source link

Save the generated images to different directory #53

Closed Anant-mishra1729 closed 1 year ago

Anant-mishra1729 commented 1 year ago

Currently, it is profile-3d-contrib, I have a directory named images. How to change the commit directory to images ?

yoshi389111 commented 1 year ago

Hello, Anant-mishra1729.

Currently it is not possible to change the output directory.

If you want to change it on the fly, add a definition that copies SVG files to your GitHub Actions flow.

Also, delete the profile-3d-contrib directory if you don't need it.

  name: GitHub-Profile-3D-Contrib

  on:
    schedule: # 03:00 JST == 18:00 UTC
      - cron: "1 0 * * *"
    workflow_dispatch:

  jobs:
    build:
      runs-on: ubuntu-latest
      name: generate-github-profile-3d-contrib
      steps:
        - uses: actions/checkout@v3
        - uses: yoshi389111/github-profile-3d-contrib@0.7.1
          env:
            GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
            USERNAME: ${{ github.repository_owner }}
            SETTING_JSON: ".github/settings.json"
+       - name: Copy files
+         run: |
+           cp -f profile-3d-contrib/* images
+           rm -rf profile-3d-contrib
        - name: Commit & Push
          run: |
            git config user.name github-actions
            git config user.email github-actions@github.com
            git add -A .
            git commit -m "generated"
            git push
Anant-mishra1729 commented 1 year ago

Great! thanks