This repository was archived by the owner on Feb 2, 2025. It is now read-only.
Check for aws-cli update #69
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: Check for aws-cli update | |
| on: | |
| schedule: | |
| - cron: '0 13 * * 2' # 13:00 UTC every Tuesday | |
| workflow_dispatch: | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| needs-update: ${{ steps.check.outputs.needs-update }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: extractions/setup-just@v2 | |
| - run: | | |
| echo "AWS_CLI_VERSION=$(just current-version)" >>"$GITHUB_ENV" | |
| - uses: KineticCafe/[email protected] | |
| id: check | |
| with: | |
| base-image: amazon/aws-cli:${{ env.AWS_CLI_VERSION }} | |
| image: kineticcafe/aws-cli-session-manager:latest | |
| platforms: linux/amd64,linux/arm64 | |
| pr: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| needs: check | |
| if: needs.check.outputs.needs-update == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@v1 | |
| id: generate-token | |
| with: | |
| app-id: ${{ secrets.KINETICCAFE_BOT_CLIENT_ID }} | |
| private-key: ${{ secrets.KINETICCAFE_BOT_PRIVATE_KEY }} | |
| - uses: actions/checkout@v4 | |
| - uses: extractions/setup-just@v2 | |
| - run: | | |
| just update-base-image | |
| - uses: peter-evans/[email protected] | |
| id: pr | |
| with: | |
| token: ${{ steps.generate-token.outputs.token }} | |
| sign-commits: true | |
| commit-message: | | |
| ${{ env.UPDATE_TITLE }} | |
| ${{ env.UPDATE_BODY }} | |
| branch: update-base-image/${{ env.UPDATE_VERSION }} | |
| title: ${{ env.UPDATE_TITLE }} | |
| body: ${{ env.UPDATE_BODY }} | |
| labels: | | |
| automated | |
| assignees: | | |
| halostatue | |
| reviewers: | | |
| halostatue | |
| - run: | | |
| gh pr merge --rebase --auto ${{ steps.pr.outputs.pull-request-number }} | |
| env: | |
| GH_TOKEN: ${{ steps.generate-token.outputs.token }} | |