Skip to content

Commit

Permalink
forks do not have permissions to push images
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Apr 30, 2024
1 parent 31ee24c commit 4c95ad8
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/build-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
jobs:
build:
name: Build
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -72,6 +73,7 @@ jobs:
retention-days: 1
merge:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
needs:
- build
steps:
Expand Down Expand Up @@ -111,4 +113,19 @@ jobs:
docker buildx imagetools inspect ${{ env.IMG_REGISTRY_HOST }}/${{ env.IMG_REGISTRY_ORG }}/limitador:${{ steps.meta.outputs.version }}
- name: Smoke Test
run: |
docker run --rm -t ${{ env.IMG_REGISTRY_HOST }}/${{ env.IMG_REGISTRY_ORG }}/limitador:${{ steps.meta.outputs.version }} limitador-server --help
docker run --rm -t ${{ env.IMG_REGISTRY_HOST }}/${{ env.IMG_REGISTRY_ORG }}/limitador:${{ steps.meta.outputs.version }} limitador-server --help
build-from-forks:
name: Build
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: limitador
tags: ${{ github.sha }}
dockerfiles: |
./Dockerfile

0 comments on commit 4c95ad8

Please sign in to comment.