Skip to content

Commit d3ba9f6

Browse files
committed
Change bucket names to variables
1 parent dff7c7b commit d3ba9f6

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/fc-kernels.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@ jobs:
2727
id: set-bucket
2828
run: |
2929
if [ "${{ github.ref_name }}" = "main" ]; then
30-
echo "DESTINATION=${{ secrets.GCP_BUCKET_NAME }}/kernels" >> $GITHUB_OUTPUT
30+
echo "DESTINATION=${{ vars.GCP_BUCKET_NAME }}/kernels" >> $GITHUB_OUTPUT
3131
else
32-
echo "DESTINATION=${{ secrets.GCP_DEV_BUCKET_NAME }}/${{ github.ref_name }}" >> $GITHUB_OUTPUT
32+
echo "DESTINATION=${{ vars.GCP_DEV_BUCKET_NAME }}/${{ github.ref_name }}" >> $GITHUB_OUTPUT
33+
echo "You can copy the built kernels by running the following command in your infra repo:"
34+
echo "gsutil cp -r builds gs://${{ vars.GCP_DEV_BUCKET_NAME }}/${{ github.ref_name }}/* gs://$(GCP_PROJECT_ID)-fc-kernels/"
3335
fi
3436
3537
- name: Upload kernels

terraform/main.tf

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,15 @@ resource "github_actions_secret" "service_account_email_secret" {
117117
plaintext_value = google_service_account.fc_kernels.email
118118
}
119119

120-
121-
resource "github_actions_secret" "gcs_bucket_name" {
122-
repository = var.github_repository
123-
secret_name = "GCP_BUCKET_NAME"
124-
plaintext_value = var.gcs_bucket_name
120+
resource "github_actions_variable" "gcs_bucket_name" {
121+
repository = var.github_repository
122+
value = var.gcs_bucket_name
123+
variable_name = "GCP_BUCKET_NAME"
125124
}
126125

127-
resource "github_actions_secret" "gcs_dev_bucket_name" {
128-
repository = var.github_repository
129-
secret_name = "GCP_DEV_BUCKET_NAME"
130-
plaintext_value = google_storage_bucket.development_bucket.name
126+
resource "github_actions_variable" "gcs_dev_bucket_name" {
127+
repository = var.github_repository
128+
variable_name = "GCP_DEV_BUCKET_NAME"
129+
value = google_storage_bucket.development_bucket.name
131130
}
132131

0 commit comments

Comments
 (0)