Skip to content

Commit

Permalink
add workflow to check sdk updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Jul 3, 2024
1 parent e9014a9 commit ac56195
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/check-sdk-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check SDK updates
on:
schedule:
- cron: "14 23 * * *"
workflow_dispatch:

permissions:
pull-requests: write
contents: write

jobs:
check:
name: Check SDK updates
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Checkout AWS SDK Go v2
run: |
git clone --depth=1 https://github.com/aws/aws-sdk-go-v2.git
- name: Check SDK updates
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_SDK_GO_V2_DIR: ./aws-sdk-go-v2
run: |
set +e
make all-services.yaml
git diff --exit-code all-services.yaml
if [[ $? -eq 0 ]]; then
echo "No changes detected"
exit 0
fi
git switch -c update-aws-sdk-go-v2-$(date +%Y-%m-%d-%H-%M-%S)
git add all-services.yaml
git commit -m "Update all-services.yaml"
gh pr create --title "Update all-services.yaml" --body "Update all-services.yaml" --base main
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
VERSION := $(shell git describe --tags)
AWS_SDK_GO_V2_DIR ?= ../../aws/aws-sdk-go-v2
.PHONY: clean test gen

build: gen awslim
Expand Down Expand Up @@ -38,4 +39,4 @@ docker-build-and-push: Dockerfile
.PHONY: all-services.yaml
all-services.yaml:
echo "services:" > all-services.yaml
ls ../../aws/aws-sdk-go-v2/service/ | awk '!/^internal$$/{print " " $$1 ":"}' >> all-services.yaml
ls $(AWS_SDK_GO_V2_DIR)/service/ | awk '!/^internal$$/{print " " $$1 ":"}' >> all-services.yaml

0 comments on commit ac56195

Please sign in to comment.