Skip to content

Commit e5b06a4

Browse files
committed
UPD: update cd workflow and config file
1 parent 023bbca commit e5b06a4

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

.github/workflows/cd-workflow.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,32 @@ jobs:
3232

3333
- name: Authenticate to Google Cloud
3434
id: auth
35-
uses: google-github-actions/auth@v2
35+
uses: google-github-actions/auth@v1
3636
with:
37-
create_credentials_file: true
38-
token_format: "access_token"
37+
#create_credentials_file: true
38+
token_format: access_token
3939
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
4040
service_account: ${{ secrets.GCP_DEPLOY_SA }}
4141

42+
- name: Set up GCP SDK
43+
uses: google-github-actions/setup-gcloud@v1
44+
with:
45+
version: "latest"
46+
project_id: ${{ secrets.GCP_PROJECT_ID }}
47+
4248
- name: Login to GAR
4349
id: login-gar
4450
uses: docker/login-action@v3
4551
with:
46-
registry: ${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/${{ secrets.GCP_GAR_REPO }}
52+
registry: ${{ secrets.GCP_REGION }}-docker.pkg.dev
4753
username: oauth2accesstoken
4854
password: ${{ steps.auth.outputs.access_token }}
4955

56+
- name: Configure Docker for Artifact Registry
57+
run: |
58+
gcloud auth configure-docker \
59+
${{ secrets.GCP_REGION }}-docker.pkg.dev
60+
5061
- name: Build and Push Docker Image
5162
id: build-and-push
5263
uses: docker/build-push-action@v5
@@ -75,14 +86,6 @@ jobs:
7586
- name: Checkout Repository
7687
uses: actions/checkout@v4
7788

78-
- name: Authenticate to Google Cloud
79-
id: auth
80-
uses: google-github-actions/auth@v2
81-
with:
82-
create_credentials_file: true
83-
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
84-
service_account: ${{ secrets.GCP_DEPLOY_SA }}
85-
8689
- name: Deploy to Cloud Run
8790
id: deploy
8891
uses: google-github-actions/deploy-cloudrun@v2

app-config.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ integrations:
3535
token: ${GITLAB_TOKEN}
3636

3737
techdocs:
38-
builder: 'local' # Alternatives - 'external'
39-
generator:
40-
runIn: 'docker' # Alternatives - 'local'
38+
builder: 'external'
4139
publisher:
42-
type: 'googleGcs' # Alternatives - 'awsS3', 'azureBlobStorage'
43-
40+
type: 'googleGcs'
41+
googleGcs:
42+
bucketName: 'backstage-codeidp-techdocs'
43+
projectId: code-idp
44+
credentials: ${}
4445
# scaffolder:
4546

4647

0 commit comments

Comments
 (0)