Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update SAM CLI with latest App Templates commit hash #3

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/update_app_templates_hash.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Update aws/aws-sam-cli with latest commit hash from aws/aws-sam-cli-app-templates

on:
schedule:
- cron: "0 * * * *"
workflow_dispatch: {}

jobs:
updateCommitHash:
permissions:
pull-requests: write
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout App Templates
uses: actions/checkout@v3
with:
repository: aws/aws-sam-cli-app-templates
path: aws-sam-cli-app-templates

- name: Checkout SAM CLI
uses: actions/checkout@v3
with:
repository: mndeveci/aws-sam-cli
path: aws-sam-cli

- name: Update commit hash in SAM CLI from App Templates
run: |
cd aws-sam-cli-app-templates
export APP_TEMPLATES_COMMIT_HASH=$(git rev-parse HEAD)
cd ../aws-sam-cli
cat <<< $(jq --arg commit_hash "$APP_TEMPLATES_COMMIT_HASH" --indent 2 '.app_template_repo_commit = $commit_hash' samcli/runtime_config.json) > samcli/runtime_config.json

- name: Raise PR for SAM CLI
uses: peter-evans/create-pull-request@v4
with:
path: aws-sam-cli
token: ${{ secrets.GITHUB_TOKEN }}
branch: update_app_templates_hash
delete-branch: true
title: 'feat: update SAM CLI with latest App Templates commit hash'
body:
This PR & commit is automatically created by GH action to update the aws/aws-sam-cli with latest hash of the aws/aws-sam-cli-app-templates.
4 changes: 2 additions & 2 deletions samcli/runtime_config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"app_template_repo_commit" : "09b7de41c32ee5f50ec8ceeec4a304534767844b"
}
"app_template_repo_commit": "d59c5aa0dba2dd5d260e00f163a55eabfa201f15"
}