Skip to content

Commit

Permalink
Add a workflow to automate config connector release bundle creation
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweim committed Feb 4, 2025
1 parent 2456040 commit d081638
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/release-automation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Config Connector Release Automation

on:
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- "**.md"
- "experiments/**"
push:
branches: ["master"]
paths-ignore:
- "**.md"
- "experiments/**"
push:
tags:
- 'v*'

jobs:
run-example:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

# - name: Authenticate to Google Cloud
# uses: google-github-actions/auth@v2
# with:
# workload_identity_provider: 'projects/758705872360/locations/global/workloadIdentityPools/YOUR_POOL_ID/providers/YOUR_PROVIDER_ID'
# service_account: '[email protected]'

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1

- name: Run the create-relese-bundle script
run: |
chmod +x ./dev/tasks/example.sh
./dev/tasks/example.sh
25 changes: 25 additions & 0 deletions dev/tasks/example.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
echo "Hello from example.sh"
# Add commands that interact with GCP here, e.g.,
# gcloud storage ls
cat <<EOF > ./dev/tasks/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: example-deployment
spec:
replicas: 1
selector:
matchLabels:
app: example
template:
metadata:
labels:
app: example
spec:
containers:
- name: example-container
image: nginx:latest
ports:
- containerPort: 80
EOF

0 comments on commit d081638

Please sign in to comment.