|
| 1 | +name: Update Docker Build Image |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: '0 0 1 * *' |
| 6 | + workflow_dispatch: |
| 7 | + |
| 8 | +jobs: |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - name: Checkout repository |
| 13 | + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 |
| 14 | + with: |
| 15 | + submodules: 'recursive' |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - name: Cache Gradle dependencies |
| 19 | + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 |
| 20 | + with: |
| 21 | + path: | |
| 22 | + ~/.gradle/caches |
| 23 | + ~/.gradle/wrapper |
| 24 | + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} |
| 25 | + restore-keys: | |
| 26 | + ${{ runner.os }}-gradle- |
| 27 | +
|
| 28 | + - name: Update Submodule |
| 29 | + run: | |
| 30 | + GRADLE_OPTS="-Dorg.gradle.jvmargs='-Xmx2G -Xms2G'" \ |
| 31 | + JAVA_HOME=$JAVA_HOME_8_X64 \ |
| 32 | + JAVA_8_HOME=$JAVA_HOME_8_X64 \ |
| 33 | + JAVA_11_HOME=$JAVA_HOME_11_X64 \ |
| 34 | + JAVA_17_HOME=$JAVA_HOME_17_X64 \ |
| 35 | + JAVA_21_HOME=$JAVA_HOME_21_X64 \ |
| 36 | + ./gradlew :dd-java-agent:agent-jmxfetch:submodulesUpdate |
| 37 | + - name: Download ghcommit CLI |
| 38 | + run: | |
| 39 | + curl https://github.com/planetscale/ghcommit/releases/download/v0.1.48/ghcommit_linux_amd64 -o /usr/local/bin/ghcommit -L |
| 40 | + chmod +x /usr/local/bin/ghcommit |
| 41 | + - name: Pick a branch name |
| 42 | + id: define-branch |
| 43 | + run: echo "branch=ci/update-jmxfetch-submodule-$(date +'%Y%m%d')" >> $GITHUB_OUTPUT |
| 44 | + - name: Create branch |
| 45 | + run: | |
| 46 | + git checkout -b ${{ steps.define-branch.outputs.branch }} |
| 47 | + git push -u origin ${{ steps.define-branch.outputs.branch }} --force |
| 48 | + - name: Commit and push changes |
| 49 | + env: |
| 50 | + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
| 51 | + run: | |
| 52 | + ghcommit --repository ${{ github.repository }} --branch ${{ steps.define-branch.outputs.branch }} --add dd-java-agent/agent-jmxfetch/integrations-core --message "Update agent-jmxfetch submodule" |
| 53 | + - name: Create pull request |
| 54 | + env: |
| 55 | + GH_TOKEN: ${{ github.token }} |
| 56 | + run: | |
| 57 | + gh pr create --title "Update agent-jmxfetch submodule" \ |
| 58 | + --base master \ |
| 59 | + --head ${{ steps.define-branch.outputs.branch }} \ |
| 60 | + --label "comp: tooling" \ |
| 61 | + --label "type: enhancement" \ |
| 62 | + --label "tag: no release notes" \ |
| 63 | + --body "This PR updates the agent-jmxfetch submodule." |
0 commit comments