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

ci: auto update binary dependencies #664

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
28 changes: 28 additions & 0 deletions .github/workflows/sync-submodules-and-deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,34 @@ jobs:
run: |
./deps/finch-core/bin/update-rootfs.sh -d ${{ secrets.DEPENDENCY_BUCKET_NAME }}

- name: Check for latest SOCI version
id: soci-version-check
uses: pozetroninc/github-action-get-latest-release@d1dafdb6e338bdab109e6afce581a01858680dfb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can we add comment for the tagged version? e.g. # v0.7.0

with:
owner: awslabs
repo: soci-snapshotter
excludes: "prerelease, draft"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update SOCI snapshotter
run: |
VERSION=$(echo ${{ steps.soci-version-check.outputs.release }} | tr -d 'v')
sed -E -i.bak "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/" ./pkg/config/lima_config_applier.go

- name: Check for latest ECR credential helper version
id: ecr-credential-helper-version-check
uses: pozetroninc/github-action-get-latest-release@d1dafdb6e338bdab109e6afce581a01858680dfb
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

with:
owner: awslabs
repo: amazon-ecr-credential-helper
excludes: "prerelease, draft"
token: ${{ secrets.GITHUB_TOKEN }}

- name: Update ECR credential helper
run: |
VERSION=$(echo ${{ steps.ecr-credential-helper-version-check.outputs.release }} | tr -d 'v')
sed -E -i.bak "s/[0-9]+\.[0-9]+\.[0-9]+/$VERSION/" ./pkg/dependency/cred_helper.go

- name: Create PR
uses: peter-evans/create-pull-request@v5
with:
Expand Down
4 changes: 2 additions & 2 deletions pkg/dependency/credhelper/cred_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
const (
description = "Installing Credential Helper"
errMsg = "Failed to finish installing credential helper"
versionEcr = "0.7.0"
hashEcr = "sha256:ff14a4da40d28a2d2d81a12a7c9c36294ddf8e6439780c4ccbc96622991f3714"
)

// NewDependencyGroup returns a dependency group that contains all the dependencies required to make credhelper work.
Expand Down Expand Up @@ -66,8 +68,6 @@ func newDeps(
installFolder := fmt.Sprintf("/Users/%s/.finch/cred-helpers/", user)
finchPath := fmt.Sprintf("/Users/%s/.finch/", user)

const versionEcr = "0.7.0"
const hashEcr = "sha256:ff14a4da40d28a2d2d81a12a7c9c36294ddf8e6439780c4ccbc96622991f3714"
credHelperURLEcr := fmt.Sprintf("https://amazon-ecr-credential-helper-releases.s3.us-east-2.amazonaws.com"+
"/%s/linux-%s/docker-credential-ecr-login", versionEcr, arch)

Expand Down
Loading