Closed vraiti closed 3 months ago
@oglok @astoycos finished rebasing the changes from #17. Could you take a look?
This PR needs a rebase as there are conflicting files.
Workflow failed to run
https://github.com/flightctl/flightctl-demos/actions/runs/9648683438
So login/ push will always fail on the PR flow, you can do something like https://github.com/bpfman/bpfman/blob/main/.github/workflows/image-build.yaml#L160 Where you can conditionally only run the registry login and push on scheduled (https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule) with if: ${{ github.event_name == 'schedule' }}
and then
- name: Set push flag
id: set-push
run: |
if [ ${{ github.event_name }} == 'push' ]; then
echo "push_flag=true" >> "$GITHUB_OUTPUT"
else
echo "push_flag=false" >> "$GITHUB_OUTPUT"
fi
- name: Build and push
id: build-push-image
uses: docker/build-push-action@v5
with:
platforms: linux/amd64, linux/arm64
# TBD: linux/ppc64le, linux/s390x
push: ${{ fromJSON(steps.set-push.outputs.push_flag) }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: ${{ matrix.image.dockerfile }}
build-args: ${{ matrix.image.build_args }}
context: ${{ matrix.image.context }}
Therefore this workflow will still run (successfully) on Prs and push only when scheduled and access to the login secrets are avaliable
Runs a simple script inside each container using rpm to check that flightctl-agent has been installed.