-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix CI #290
Fix CI #290
Conversation
Mergecat's ReviewClick to read mergecats review!😼 Mergecat review of .github/workflows/on_pull_request.yaml@@ -32,10 +32,12 @@ jobs:
- uses: ./.github/actions/build-image
id: build-image
with:
+ push: '${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}'
image_tag: ${{ env.FS_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: mshick/add-pr-comment@v2
with:
message: |
Temporary image available at `${{ steps.build-image.outputs.image }}`.
+ if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name Feedback & Suggestions:
😼 Mergecat review of .github/workflows/on_push_to_main.yaml@@ -23,6 +23,7 @@ jobs:
- uses: ./.github/actions/build-image
with:
+ push: 'true'
image_tag: ${{ env.GIT_TAG }}
token: ${{ secrets.GITHUB_TOKEN }}
Feedback & Suggestions:
😼 Mergecat review of .github/actions/build-image/action.yaml@@ -5,6 +5,10 @@ inputs:
image_tag:
description: The image tag
required: true
+ push:
+ description: True to push image after building, false otherwise
+ required: false
+ default: "false"
tag_latest:
description: Tag latest as well as the provided tag
default: "false"
@@ -21,7 +25,7 @@ runs:
using: composite
steps:
- - uses: docker/setup-qemu-action@v1
+ - uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
@@ -32,7 +36,7 @@ runs:
with: { version: "v${{ env.EARTHLY_TOOL_VERSION }}" }
- name: login to registry
- uses: docker/login-action@v1
+ uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
@@ -42,8 +46,8 @@ runs:
shell: bash
run: >-
./earthly.sh
- --push
+ ${{ inputs.push == 'true' && '--push' || '' }}
+docker-multiarch
- ${{ inputs.tag_latest != 'false' && format('--LATEST_IMAGE_NAME=ghcr.io/{0}:latest', github.repository) || '' }}
+ ${{ inputs.tag_latest != 'false' && format('--LATEST_IMAGE_NAME=ghcr.io/{0}:latest', github.repository) || '' }}
--GIT_TAG=${{ inputs.image_tag }}
--IMAGE_NAME=ghcr.io/${{ github.repository }}:${{ inputs.image_tag }} Feedback & Suggestions:
Dependency ReviewClick to read mergecats review!No suggestions found |
GitHub has some limitations where pull requests that come from forks cannot create packages within the origin repo. This ensures that we can still create the PR images when sent to its own repo, but otherwise the push gets skipped.