-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: KhulnaSoft bot <[email protected]>
- Loading branch information
1 parent
8facc0f
commit 9e16f12
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,9 @@ name: 'Deploy with Terraform' | |
|
||
on: workflow_dispatch | ||
|
||
permissions: read-all | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
jobs: | ||
terraform: | ||
|
@@ -18,19 +20,19 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/[email protected].2 | ||
uses: hashicorp/[email protected].12 | ||
|
||
- name: Authenticate to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
password: ${{ secrets.GITHUB_TOKEN }} # Use PAT if necessary | ||
|
||
- name: Build and push Docker image to GHCR | ||
run: | | ||
docker build -t ghcr.io/${{ github.repository }}/scheduled-feeds:latest . | ||
docker push ghcr.io/${{ github.repository }}/scheduled-feeds:latest | ||
docker build -t ghcr.io/khulnasoft-lab/package-feeds/scheduled-feeds:latest . | ||
docker push ghcr.io/khulnasoft-lab/package-feeds/scheduled-feeds:latest | ||
- name: Terraform Init | ||
run: terraform init | ||
|
@@ -57,4 +59,4 @@ jobs: | |
--platform managed \ | ||
--region us-central1 \ | ||
--max-instances=1 \ | ||
--image ghcr.io/${{ github.repository }}/scheduled-feeds:latest; | ||
--image ghcr.io/khulnasoft-lab/package-feeds/scheduled-feeds:latest; |