diff --git a/.github/workflows/example-build-deploy-dotnet-google.yml b/.github/workflows/example-build-deploy-dotnet-google.yml index b5eb5a34..d32c3920 100644 --- a/.github/workflows/example-build-deploy-dotnet-google.yml +++ b/.github/workflows/example-build-deploy-dotnet-google.yml @@ -71,8 +71,8 @@ jobs: deploy-dev: name: Deploy Dev - # Required these jobs to be successful before running this job. - # Any of these can be commented out if you want to deploy anyway. + # Require all jobs below to be successful before running this job. + # Any of these can be commented out or removed if you want to deploy anyway. needs: - unit-tests - integration-tests @@ -83,7 +83,7 @@ jobs: contents: read id-token: write environment: dev - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -106,7 +106,7 @@ jobs: contents: read id-token: write environment: test - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -129,7 +129,7 @@ jobs: contents: read id-token: write environment: prod - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk diff --git a/.github/workflows/example-build-deploy-dotnet.yml b/.github/workflows/example-build-deploy-dotnet.yml index 3bc934b0..a47e5026 100644 --- a/.github/workflows/example-build-deploy-dotnet.yml +++ b/.github/workflows/example-build-deploy-dotnet.yml @@ -71,8 +71,8 @@ jobs: deploy-dev: name: Deploy Dev - # Required these jobs to be successful before running this job. - # Any of these can be commented out if you want to deploy anyway. + # Require all jobs below to be successful before running this job. + # Any of these can be commented out or removed if you want to deploy anyway. needs: - unit-tests - integration-tests @@ -83,7 +83,7 @@ jobs: contents: read id-token: write environment: dev - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -104,7 +104,7 @@ jobs: contents: read id-token: write environment: test - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -125,7 +125,7 @@ jobs: contents: read id-token: write environment: prod - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk diff --git a/.github/workflows/example-build-deploy-go-google.yml b/.github/workflows/example-build-deploy-go-google.yml index 5aa3d39d..9655567d 100644 --- a/.github/workflows/example-build-deploy-go-google.yml +++ b/.github/workflows/example-build-deploy-go-google.yml @@ -44,8 +44,8 @@ jobs: deploy-dev: name: Deploy Dev - # Required these jobs to be successful before running this job. - # Any of these can be commented out if you want to deploy anyway. + # Require all jobs below to be successful before running this job. + # Any of these can be commented out or removed if you want to deploy anyway. needs: - build-scan - analyze @@ -54,7 +54,7 @@ jobs: contents: read id-token: write environment: dev - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -77,7 +77,7 @@ jobs: contents: read id-token: write environment: test - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -100,7 +100,7 @@ jobs: contents: read id-token: write environment: prod - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk diff --git a/.github/workflows/example-build-deploy-go.yml b/.github/workflows/example-build-deploy-go.yml index a31b3adb..a47e754b 100644 --- a/.github/workflows/example-build-deploy-go.yml +++ b/.github/workflows/example-build-deploy-go.yml @@ -44,8 +44,8 @@ jobs: deploy-dev: name: Deploy Dev - # Required these jobs to be successful before running this job. - # Any of these can be commented out if you want to deploy anyway. + # Require all jobs below to be successful before running this job. + # Any of these can be commented out or removed if you want to deploy anyway. needs: - build-scan - analyze @@ -54,7 +54,7 @@ jobs: contents: read id-token: write environment: dev - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -75,7 +75,7 @@ jobs: contents: read id-token: write environment: test - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk @@ -96,7 +96,7 @@ jobs: contents: read id-token: write environment: prod - # Only on push to trunk + # Only on push to $default-branch if: github.ref == 'refs/heads/trunk' steps: - uses: 3lvia/core-github-actions-templates/deploy@trunk diff --git a/.github/workflows/update-starter-workflows.yml b/.github/workflows/update-starter-workflows.yml index 3e2dcc49..2764e6ee 100644 --- a/.github/workflows/update-starter-workflows.yml +++ b/.github/workflows/update-starter-workflows.yml @@ -65,6 +65,7 @@ jobs: sed -i "s/ SYSTEM_NAME: 'core'/ SYSTEM_NAME: ''/g" "$new_workflow_path" sed -i "s/ HELM_VALUES_PATH: '.*'/ HELM_VALUES_PATH: '.github\/deploy\/values.yml'/g" "$new_workflow_path" sed -i "s/ PROJECT_FILE: '.*'/ PROJECT_FILE: ''/g" "$new_workflow_path" + sed -i "s/refs\/heads\/trunk/$default-branch/g" "$new_workflow_path" sed -i "s/# pull_request:/ pull_request:/g" "$new_workflow_path" sed -i "s/# branches: \[trunk\]/ branches: \[trunk\]/g" "$new_workflow_path" sed -i 's/branches: \[trunk\]/branches: \[$default-branch\]/g' "$new_workflow_path"