-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
35 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,33 +50,12 @@ jobs: | |
go- | ||
- name: Update ${{ matrix.resource }} | ||
run: make update-${{ matrix.resource }} | ||
- name: Commit changes | ||
id: commit | ||
run: | | ||
git checkout $DEFAULT_BRANCH | ||
git checkout -B update-${{ matrix.resource }} | ||
git add -u | ||
if ! EDITOR=true git commit -m "Update ${{ matrix.resource }}"; then | ||
echo "changes=false" >> $GITHUB_OUTPUT | ||
exit 0 | ||
fi | ||
echo "changes=true" >> $GITHUB_OUTPUT | ||
! git diff --exit-code $DEFAULT_BRANCH HEAD | ||
git push --force-with-lease origin HEAD | ||
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1 | ||
name: Open PR to ${{env.DEFAULT_BRANCH}} | ||
if: steps.commit.outputs.changes == 'true' | ||
- name: Upsert pull request | ||
uses: peter-evans/create-pull-request@70a41aba780001da0a30141984ae2a0c95d8704e #v6.0.2 | ||
with: | ||
github-token: ${{ secrets.EKSCTLBOT_TOKEN }} | ||
script: | | ||
const { data: pr } = await github.rest.pulls.create({ | ||
...context.repo, | ||
title: "Update ${{ matrix.resource }}", | ||
head: "update-${{ matrix.resource }}", | ||
base: "${{ env.DEFAULT_BRANCH }}", | ||
}); | ||
await github.rest.issues.addLabels({ | ||
...context.repo, | ||
issue_number: pr.number, | ||
labels: ["kind/improvement"], | ||
}); | ||
token: ${{ secrets.EKSCTLBOT_TOKEN }} | ||
commit-message: update ${{ matrix.resource }} | ||
committer: eksctl-bot <[email protected]> | ||
title: 'Update ${{ matrix.resource }}' | ||
branch: update-${{ matrix.resource }} | ||
labels: area/tech-debt |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
# Set base URL for VPC CNI releases on GitHub | ||
base_url="https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/" | ||
|
||
get_latest_release_tag() { | ||
curl -sL https://api.github.com/repos/aws/amazon-vpc-cni-k8s/releases/latest | jq -r '.tag_name' | ||
} | ||
|
||
latest_release_tag=$(get_latest_release_tag) | ||
|
||
default_addons_dir="pkg/addons/default" | ||
|
||
# Download the latest aws-k8s-cni.yaml file | ||
curl -sL "$base_url$latest_release_tag/config/master/aws-k8s-cni.yaml?raw=1" --output "$default_addons_dir/assets/aws-node.yaml" | ||
|
||
echo "found latest release tag:" $latest_release_tag | ||
|
||
# Update the unit test file | ||
sed -i "s/expectedVersion = \"\(.*\)\"/expectedVersion = \"$latest_release_tag\"/g" "$default_addons_dir/aws_node_test.go" |