Skip to content

Commit

Permalink
Named all actions from workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-belellou committed Nov 25, 2024
1 parent 1a3b309 commit 43bcb9a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 13 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,20 @@ jobs:
CI_BADGES_GIST_STAGING: b215880fcc3b1db343bccd1147ed9c06

steps:
- uses: actions/checkout@v4
- name: "Checkout repository"
uses: actions/checkout@v4

- name: Set up JDK 21
- name: "Set up JDK 21"
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven

- name: Build with Maven
- name: "Build with Maven"
run: mvn verify --batch-mode --no-transfer-progress

- name: JUnit Test Report
- name: "JUnit test report"
uses: dorny/test-reporter@1a288b62f8b75c0f433cbfdbc2e4800fbae50bd7
if: ${{ !cancelled() }}
with:
Expand All @@ -34,7 +35,7 @@ jobs:
reporter: java-junit
use-actions-summary: 'true'

- name: JaCoCo Code Coverage Report
- name: "JaCoCo code coverage report"
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@4fc6bf270fe893e8dda5467e432253a6961345b8
if: ${{ !cancelled() }}
Expand All @@ -44,7 +45,7 @@ jobs:
coverage_report_title: JaCoCo
skip_check_run: true

- name: Add JaCoCo report to workflow run summary
- name: "Add JaCoCo report to workflow run summary"
if: ${{ steps.jacoco_reporter.outputs.coverage_percentage != '' }}
run: |
echo "## Code Coverage" >> $GITHUB_STEP_SUMMARY
Expand All @@ -55,11 +56,13 @@ jobs:
echo "| :x: Number of Lines Missed | ${{ steps.jacoco_reporter.outputs.missed_lines }} |" >> $GITHUB_STEP_SUMMARY
echo "| Total Number of Lines | ${{ steps.jacoco_reporter.outputs.total_lines }} |" >> $GITHUB_STEP_SUMMARY
- uses: gaelgirodon/ci-badges-action@14c20f94cfdcbb27ce33e8793fa3245c25ddca14
- name: "Update CI badges"
uses: gaelgirodon/ci-badges-action@14c20f94cfdcbb27ce33e8793fa3245c25ddca14
env:
GIST_ID: ${{ github.event_name == 'push' && github.ref_name == 'main' && env.CI_BADGES_GIST || env.CI_BADGES_GIST_STAGING }}
with:
gist-id: ${{ env.GIST_ID }}
token: ${{ secrets.CI_BADGES_GIST_TOKEN }}

- uses: kevincobain2000/action-camo-purge@5169e719d6daf0fdbf8d2174f9438f919627aa87
- name: "Purge camo cache"
uses: kevincobain2000/action-camo-purge@5169e719d6daf0fdbf8d2174f9438f919627aa87
20 changes: 15 additions & 5 deletions .github/workflows/update-readme-stars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,19 @@ jobs:
YEAR_2015: 2015

steps:
- uses: actions/checkout@v4
- name: "Checkout repository"
uses: actions/checkout@v4

- uses: J0B10/aoc-badges-action@75cd611df531bd9aa0675cae13be418d73cbdf76
- name: "Update stars badges in README.md"
uses: J0B10/aoc-badges-action@75cd611df531bd9aa0675cae13be418d73cbdf76
with:
userid: ${{ env.ADVENT_USER_ID }}
session: ${{ secrets.ADVENT_OF_CODE_SESSION }}
year: ${{ env.YEAR_2015 }}
starsRegex: '(?<=https:\/\/img\.shields\.io\/badge\/%E2%AD%90_in_2015-)[0-9]+(?=_%2F_50-yellow)'

- uses: k2bd/advent-readme-stars@27bfdb5e0e611d0f006356cfe37dbfb505b0ee49
- name: "Update stars array in README.md"
uses: k2bd/advent-readme-stars@27bfdb5e0e611d0f006356cfe37dbfb505b0ee49
with:
userId: ${{ env.ADVENT_USER_ID }}
sessionCookie: ${{ secrets.ADVENT_OF_CODE_SESSION }}
Expand All @@ -41,11 +44,18 @@ jobs:
git_user_signingkey: true
git_commit_gpgsign: true

- uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842
- name: "Commit modifications if any"
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842
id: auto-commit-action
with:
commit_message: Update README with latest stars
commit_author: "${{ steps.import-gpg.outputs.name }} [bot] <${{ steps.import-gpg.outputs.email }}>"
commit_user_name: ${{ steps.import-gpg.outputs.name }} [bot]
commit_user_email: ${{ steps.import-gpg.outputs.email }}

- uses: kevincobain2000/action-camo-purge@5169e719d6daf0fdbf8d2174f9438f919627aa87
- name: "Run if changes have been detected"
if: steps.auto-commit-action.outputs.changes_detected == 'true'
run: echo "📝 Modifications committed with sha ${{ steps.auto-commit-action.outputs.commit_hash }}"

- name: "Purge camo cache"
uses: kevincobain2000/action-camo-purge@5169e719d6daf0fdbf8d2174f9438f919627aa87

0 comments on commit 43bcb9a

Please sign in to comment.