diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a0b12b8..54ef6b0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,10 +1,12 @@ name: "Release dev container features" on: - workflow_dispatch: + release: + types: [published] # Triggers automatically when you hit "Publish Release" + workflow_dispatch: # Keeps the manual "Run workflow" button just in case jobs: deploy: - if: ${{ github.ref == 'refs/heads/main' }} + # Removed the 'if' condition so it can process release events cleanly runs-on: ubuntu-latest permissions: contents: write diff --git a/README.md b/README.md index 640dff0..612867d 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,25 @@ These examples show how to use features from this repository in a devcontainer: { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { - "ghcr.io/jajera/features/ag:1": {}, - "ghcr.io/jajera/features/agentcore-cli:1": {}, - "ghcr.io/jajera/features/amazon-q-cli:1": {}, - "ghcr.io/jajera/features/aws-sam-cli:1": {}, - "ghcr.io/jajera/features/gcloud-cli:1": {}, - "ghcr.io/jajera/features/zip:1": {} + "ghcr.io/skyred/features/ag:1": {}, + "ghcr.io/skyred/features/agentcore-cli:1": {}, + "ghcr.io/skyred/features/amazon-q-cli:1": {}, + "ghcr.io/skyred/features/aws-sam-cli:1": {}, + "ghcr.io/skyred/features/gcloud-cli:1": {}, + "ghcr.io/skyred/features/zip:1": {} } } ``` -Or use individual features: +Or use individual features with an additonal plugin: ```jsonc { "image": "mcr.microsoft.com/devcontainers/base:ubuntu", "features": { - "ghcr.io/jajera/features/gcloud-cli:1": {} + "ghcr.io/skyred/features/gcloud-cli:1": { + "installGkeAuthPlugin": true + } } } ``` diff --git a/src/gcloud-cli/devcontainer-feature.json b/src/gcloud-cli/devcontainer-feature.json index da6c9d9..ef90e12 100644 --- a/src/gcloud-cli/devcontainer-feature.json +++ b/src/gcloud-cli/devcontainer-feature.json @@ -1,7 +1,14 @@ { "name": "Google Cloud CLI", "id": "gcloud-cli", - "version": "1.0.1", + "version": "1.1.1", "description": "Installs Google Cloud CLI (gcloud) for Google Cloud Platform development.", - "documentationURL": "https://cloud.google.com/sdk/docs/install" + "documentationURL": "https://cloud.google.com/sdk/docs/install", + "options": { + "installGkeAuthPlugin": { + "type": "boolean", + "default": false, + "description": "Install the GKE gcloud auth plugin for kubectl authentication." + } + } } diff --git a/src/gcloud-cli/install.sh b/src/gcloud-cli/install.sh index 89ba197..6ef5fe4 100755 --- a/src/gcloud-cli/install.sh +++ b/src/gcloud-cli/install.sh @@ -296,4 +296,12 @@ export CLOUDSDK_PYTHON="$INSTALL_DIR/platform/bundledpythonunix/bin/python3" echo "⚠️ Warning: Could not initialize gcloud automatically. You may need to run 'gcloud init' manually." } +# Install GKE Auth Plugin if requested +if [ "${INSTALLGKEAUTHPLUGIN}" = "true" ] || [ "${INSTALL_GKE_AUTH_PLUGIN}" = "true" ]; then + echo "📦 Installing gke-gcloud-auth-plugin..." + "$INSTALL_DIR/bin/gcloud" components install gke-gcloud-auth-plugin --quiet || { + echo "⚠️ Warning: Could not install gke-gcloud-auth-plugin automatically." + } +fi + echo "✅ Google Cloud CLI installation complete!"