Add GitHub Actions reusable action for Vera (Issue #20)#32
Open
ZhuochengHe wants to merge 16 commits intoproject-vera:mainfrom
Open
Add GitHub Actions reusable action for Vera (Issue #20)#32ZhuochengHe wants to merge 16 commits intoproject-vera:mainfrom
ZhuochengHe wants to merge 16 commits intoproject-vera:mainfrom
Conversation
Contributor
Author
|
Related Issue: #20 |
- docker rm -f before docker run to handle retries/dirty runners - Remove trailing / from CLOUDSDK_API_ENDPOINT_OVERRIDES_COMPUTE to avoid double-slash when user-supplied endpoint already ends with / - Add cleanup step (if: always()) in test workflow to stop containers after each job, keeping runners clean
- Matrix strategy builds vera-aws and vera-gcp in parallel - docker/metadata-action generates latest + sha + branch tags automatically - Build cache (type=gha) avoids full rebuilds on unchanged layers - Remove paths filter so main always builds (no silent misses)
type=gha cache requires the docker-container buildx driver. docker/setup-buildx-action@v3 switches to it automatically.
Trigger on 'v*' tags only (e.g. v1.0.0) so images are published at release time, not on every commit. Tags generated: - latest - v1.2.3 (full semver) - v1.2 (major.minor)
Documents vera-setup action usage for Terraform, AWS CLI, gcloud CLI, and boto3, including env vars, options, and cleanup step.
b143db2 to
b8b7bd9
Compare
d06bee4 to
7afab12
Compare
Contributor
Author
|
See TODO in action.yml. The current working repo is my forked repo. |
CLOUDSDK_API_ENDPOINT_OVERRIDES_COMPUTE, CLOUDSDK_CORE_PROJECT, and GOOGLE_OAUTH_ACCESS_TOKEN are already exported by vera-setup. Only --access-token-file is needed to bypass gcloud credential checks.
4a9e241 to
fe7475f
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds GitHub Actions support for Vera (Issue #20). Three files under
.github/:actions/vera-setup/action.yml— reusable composite action for external projects. Pulls prebuilt emulator images fromghcr.io, starts them viadocker run, polls for health, and writes all env vars (AWS_ENDPOINT_URL,CLOUDSDK_*, etc.) to$GITHUB_ENVso subsequent steps can use AWS CLI, gcloud, and Terraform without any extra configuration.workflows/publish.yml— triggered onv*release tags. Buildsvera-awsandvera-gcpDocker images in parallel (matrix strategy), pushes toghcr.iowithlatest, full semver, andmajor.minortags. Uses GHA build cache to avoid full rebuilds.workflows/test-action.yml— manual-only (workflow_dispatch) integration test for the action itself. Runs two jobs: both emulators together, and AWS-only (start-gcp: false). Verifies env vars, AWS CLI, and gcloud CLI all work against the emulators.Usage (external projects)