|
| 1 | +name: Update ETOS defaults |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + test-runner-version: |
| 7 | + description: 'ETOS test runner version' |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + test-runner-release-body: |
| 11 | + description: 'The release body that triggered this workflow' |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + |
| 15 | +env: |
| 16 | + REPOSITORY_OWNER: eiffel-community |
| 17 | + ETOS_REPOSITORY: etos |
| 18 | + ETOS_TEST_RUNNER_REPOSITORY: etos-test-runner |
| 19 | + |
| 20 | +jobs: |
| 21 | + update-etos-defaults: |
| 22 | + runs-on: ubuntu-latest |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v6 |
| 25 | + - name: Generate a token |
| 26 | + id: generate-token |
| 27 | + uses: actions/create-github-app-token@v2 |
| 28 | + with: |
| 29 | + owner: ${{ env.REPOSITORY_OWNER }} |
| 30 | + repositories: ${{ env.ETOS_REPOSITORY }} |
| 31 | + app-id: ${{ vars.ETOS_PR_APP_ID }} |
| 32 | + private-key: ${{ secrets.ETOS_PR_APP_PRIVATE_KEY }} |
| 33 | + - uses: actions/checkout@v6 |
| 34 | + with: |
| 35 | + repository: ${{ env.REPOSITORY_OWNER }}/${{ env.ETOS_REPOSITORY }} |
| 36 | + token: ${{ steps.generate-token.outputs.token }} |
| 37 | + - name: Update manifests |
| 38 | + uses: fjogeleit/yaml-update-action@main |
| 39 | + with: |
| 40 | + commitChange: false |
| 41 | + token: ${{ steps.generate-token.outputs.token }} |
| 42 | + changes: | |
| 43 | + { |
| 44 | + "defaults/test_runner.yaml": { |
| 45 | + ".version": "${{ inputs.test-runner-version }}" |
| 46 | + } |
| 47 | + } |
| 48 | + - name: Create Pull Request |
| 49 | + uses: peter-evans/create-pull-request@v8 |
| 50 | + with: |
| 51 | + token: ${{ steps.generate-token.outputs.token }} |
| 52 | + commit-message: Update to ETOS test runner ${{ inputs.test-runner-version }} |
| 53 | + title: "Integrate \"${{ inputs.test-runner-version }}\"" |
| 54 | + body: "Automated update of ETOS version for Test Runner\n |
| 55 | +
|
| 56 | + Release: https://github.com/${{ env.REPOSITORY_OWNER }}/${{ env.ETOS_TEST_RUNNER_REPOSITORY }}/releases/tag/${{ inputs.test-runner-version }}\n |
| 57 | +
|
| 58 | + ${{ inputs.test-runner-release-body }}" |
| 59 | + sign-commits: true |
| 60 | + branch: "update-etos-test-runner-${{ github.run_id }}" |
| 61 | + labels: automated-pr, dependencies, etos-test-runner |
0 commit comments