Skip to content

Commit

Permalink
Github Actions Security Best practices: Pin Actions to Full lenght Co…
Browse files Browse the repository at this point in the history
…mmit SHA - Main push regen action (#2156)
  • Loading branch information
oscerd authored Aug 20, 2024
1 parent 9d17d07 commit 93bb056
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/main-push-regen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,27 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions: # added using https://github.com/step-security/secure-repo
contents: read

jobs:
build:
permissions:
contents: write # for peter-evans/create-pull-request to create branch
pull-requests: write # for peter-evans/create-pull-request to create a PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@6a0805fcefea3d4657a47ac4c165951e33482018 # v4.2.2
with:
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Install Go
uses: actions/setup-go@v5
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: 1.20.x
- name: Build catalog 1st Run
Expand All @@ -55,7 +61,7 @@ jobs:
cd script/generator
go run . ../../kamelets/ ../../docs/modules/ROOT/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
with:
base: main
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit 93bb056

Please sign in to comment.