Restricted token permissions

This commit is contained in:
Héctor Molinero Fernández 2022-04-28 22:04:56 +02:00
parent f119b96cf3
commit 710df5beb9

View File

@ -1,4 +1,4 @@
name: 'CI' name: 'Main'
on: on:
push: push:
@ -15,6 +15,8 @@ jobs:
validate-packer: validate-packer:
name: 'Validate Packer configuration' name: 'Validate Packer configuration'
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
permissions:
contents: 'read'
defaults: defaults:
run: run:
working-directory: './packer/' working-directory: './packer/'
@ -36,6 +38,8 @@ jobs:
validate-terraform: validate-terraform:
name: 'Validate Terraform configuration' name: 'Validate Terraform configuration'
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
permissions:
contents: 'read'
defaults: defaults:
run: run:
working-directory: './terraform/' working-directory: './terraform/'
@ -61,6 +65,8 @@ jobs:
name: 'Build Packer image' name: 'Build Packer image'
needs: ['validate-packer'] needs: ['validate-packer']
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
permissions:
contents: 'read'
defaults: defaults:
run: run:
working-directory: './packer/' working-directory: './packer/'