Skip to content

Commit

Permalink
fix: permissions in CI, add PR CI
Browse files Browse the repository at this point in the history
Signed-off-by: K.B.Dharun Krishna <[email protected]>
  • Loading branch information
kbdharun committed May 3, 2024
1 parent 6ca5e9c commit 845fc93
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/image-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Image (PR)

on:
pull_request:
branches: [ "main" ]

env:
IMAGE_NAME: dev-image

jobs:
image:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4

- uses: vanilla-os/[email protected]
with:
recipe: 'recipe.yml'

- uses: actions/upload-artifact@v4
with:
name: Containerfile
path: Containerfile

- name: Rename Containerfile to Dockerfile
run: mv Containerfile Dockerfile

- name: Build and push image
uses: docker/[email protected]
with:
context: .
push: false
tags: ${{ github.actor }}/${{ env.IMAGE_NAME }}:main
5 changes: 5 additions & 0 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ env:
jobs:
image:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
attestations: write

steps:
- uses: actions/checkout@v4

Expand Down

0 comments on commit 845fc93

Please sign in to comment.