Update Profile #842
This file contains hidden or 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
| name: Update Profile | |
| on: | |
| ## Trigger on merge event to main brnach | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "generate_profile.sh" | |
| - "repository_list.txt" | |
| - ".github/workflows/*" | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" # Run every night at midnight | |
| env: | |
| CI: true | |
| STORM_REPOSITORY: ${{ github.repositoryUrl }} | |
| STORM_WORKSPACE_ROOT: ${{ github.workspace }} | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| jobs: | |
| update-profile: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup workspace | |
| uses: storm-software/action-devenv-setup@main | |
| with: | |
| gpg-sign-key: ${{ secrets.STORM_BOT_GPG_SIGN_KEY }} | |
| gpg-private-key: ${{ secrets.STORM_BOT_GPG_PRIVATE_KEY }} | |
| gpg-passphrase: ${{ secrets.STORM_BOT_GPG_PASSPHRASE }} | |
| storm-bot-github-token: ${{ secrets.STORM_BOT_GITHUB_TOKEN }} | |
| - name: Add permissions to generate_profile.sh | |
| run: chmod a=rwx ./generate_profile.sh | |
| - name: Generate Profile | |
| run: ./generate_profile.sh repository_list.txt | |
| - name: Create Pull Request | |
| id: cpr | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ github.token }} | |
| commit-message: "Update Profile README with new repositories" | |
| committer: "Stormie-Bot <support@stormsoftware.com>" | |
| author: "Stormie-Bot <support@stormsoftware.com>" | |
| signoff: true | |
| sign-commits: true | |
| delete-branch: true | |
| base: "main" | |
| title: "Update the Profile README with new repositories" | |
| body: | | |
| Update repository list in the Profile README with the latest repositories. | |
| - More information can be found by reading [this article][1] | |
| - This PR was auto-generated by [Stormie-Bot][2] | |
| [1]: https://dev.to/tungbq/github-create-your-own-repository-landscape-16i5 | |
| [2]: https://github.com/Stormie-Bot | |
| labels: "update, automated-pr" | |
| - name: Send Discord notification - Deployment successful | |
| uses: Ilshidur/action-discord@master | |
| with: | |
| args: "Successfully updated GitHub profile's repositories list - #${{ github.run_number }}" | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.STORM_BOT_DISCORD_WEBHOOK }} | |
| DISCORD_USERNAME: Stormie-Bot | |
| DISCORD_AVATAR: "https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-stormie.png" | |
| DISCORD_EMBEDS: '[{"title": "Successfully updated the list of repositories in GitHub profile!", "description": "Update of repository list in Storm Softwares ${{ github.repository }} repository has finished successfully - #${{ github.run_number }}", "thumbnail": { "url": "https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-fill.png" }, "image": { "url": "https://pub-761b436209f44a4d886487c917806c08.r2.dev/logo-fill.png" }, "author": { "name": "${{ github.actor }}", "url": "https://github.com/${{ github.actor }}", "icon_url": "https://avatars.githubusercontent.com/u/${{ github.actor_id }}?v=4" }, "fields": [ { "name": "Repository", "value": "${{ github.repository }}" }, { "name": "Repository URL", "value": "${{ github.repositoryUrl }}" }, { "name": "Pipeline Status", "value": "Success" }], "color": 556891, "timestamp": "${{ github.event.repository.updated_at }}", "url": "${{ github.event.pull_request.html_url || github.event.head_commit.url }}", "footer": { "text": "Click here to see the full workflow details: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}", "icon_url": "https://pub-761b436209f44a4d886487c917806c08.r2.dev/icon-fill.png" }}]' |