Skip to content

Commit d13a21b

Browse files
authored
Add permissions to publish action (#13)
* Add permissions to publish action Closes https://github.com/b0bcarlson/bobcodes.net/security/code-scanning/1 * Pin terraform to 1.11.1; Pin digitalocean provider Ref hashicorp/terraform#36704
1 parent fa70310 commit d13a21b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/publish.yml

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- main
66
workflow_dispatch:
7+
permissions:
8+
pull-requests: write
9+
contents: read
710
jobs:
811
publish:
912
runs-on: ubuntu-latest
@@ -18,6 +21,8 @@ jobs:
1821
uses: actions/[email protected]
1922
- name: Setup Terraform
2023
uses: hashicorp/[email protected]
24+
with:
25+
terraform_version: "1.11.1"
2126
- name: Init Terraform
2227
working-directory: terraform
2328
run: terraform init -input=false

.github/workflows/pull-request.yml

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
uses: actions/[email protected]
2121
- name: Setup Terraform
2222
uses: hashicorp/[email protected]
23+
with:
24+
terraform_version: "1.11.1"
2325
- name: Init Terraform
2426
working-directory: terraform
2527
run: terraform init -input=false

terraform/main.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
digitalocean = {
44
source = "digitalocean/digitalocean"
5-
version = "~> 2.0"
5+
version = "2.49.1"
66
}
77
}
88
}

0 commit comments

Comments
 (0)