-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adrian Riobo Lorenzo <[email protected]>
- Loading branch information
1 parent
f6be286
commit b186fc4
Showing
23 changed files
with
1,253 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: crc-builder-builder | ||
|
||
on: | ||
push: | ||
# If release-info is not changed we may override a version | ||
tags: [ '*' ] | ||
paths: | ||
- '.github\/workflows\/crc-builder\/release-info' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'crc-builder/**' | ||
- '.github\/workflows\/crc-builder*' | ||
|
||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Prepare runner | ||
shell: bash | ||
run: | | ||
sudo apt-get install -y qemu-user-static | ||
- name: Build image for PR | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
# CRC_BUILDER: ghcr.io/crc-org/ci-crc-builder | ||
CRC_BUILDER: ghcr.io/adrianriobo/ci-crc-builder | ||
CRC_BUILDER_V: pr-${{ github.event.number }} | ||
run: | | ||
make crc-builder-oci-build | ||
make crc-builder-oci-save | ||
echo "image=${SNC_RUNNER}:${SNC_RUNNER_V}" >> "$GITHUB_ENV" | ||
- name: Build image for Release | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
make crc-builder-oci-build | ||
make crc-builder-oci-save | ||
echo "image=$(sed -n 1p crc-builder/release-info):v$(sed -n 2p crc-builder/release-info)" >> "$GITHUB_ENV" | ||
- name: Create image metadata | ||
run: | | ||
echo ${{ env.image }} > crc-builder-image | ||
echo ${{ github.event_name }} > crc-builder-build-event | ||
- name: Upload crc-builder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: crc-builder | ||
path: crc-builder* | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: crc-builder-pusher | ||
|
||
on: | ||
workflow_run: | ||
workflows: crc-builder-builder | ||
types: | ||
- completed | ||
|
||
jobs: | ||
push: | ||
name: push | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Download crc-builder assets | ||
id: download-gh-context-artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: crc-builder | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ github.token }} | ||
|
||
- name: Get crc-builder build informaiton | ||
run: | | ||
echo "source_event=$(cat crc-builder-build-event)" >> "$GITHUB_ENV" | ||
echo "image=$(cat crc-builder-image)" >> "$GITHUB_ENV" | ||
- name: Log in to ghcr.io for PR | ||
if: ${{ env.source_event == 'pull_request' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Log in to ghcr.io | ||
if: ${{ env.source_event == 'push' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Log in quay.io | ||
if: ${{ env.source_event == 'push' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_IO_USERNAME }} | ||
password: ${{ secrets.QUAY_IO_PASSWORD }} | ||
|
||
- name: Push crc-builder | ||
run: | | ||
make snc-runner-oci-load | ||
IMAGE=${{ env.image }} make snc-runner-oci-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: snc-runner-builder | ||
|
||
on: | ||
push: | ||
tags: [ '*' ] | ||
paths: | ||
- '.github\/workflows\/snc-runner\/release-info' | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- 'snc-runner/**' | ||
- '.github\/workflows\/snc-runner*' | ||
jobs: | ||
build: | ||
name: build | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build image for PR | ||
if: ${{ github.event_name == 'pull_request' }} | ||
env: | ||
# SNC_RUNNER: ghcr.io/crc-org/ci-snc-runner | ||
SNC_RUNNER: ghcr.io/adrianriobo/ci-snc-runner | ||
SNC_RUNNER_V: pr-${{ github.event.number }} | ||
run: | | ||
make snc-runner-oci-build | ||
make snc-runner-oci-save | ||
echo "image=${SNC_RUNNER}:${SNC_RUNNER_V}" >> "$GITHUB_ENV" | ||
- name: Build image for Release | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
make snc-runner-oci-build | ||
make snc-runner-oci-save | ||
# Get values from release-info | ||
echo "image=$(sed -n 1p snc-runner/release-info):v$(sed -n 2p snc-runner/release-info)" >> "$GITHUB_ENV" | ||
- name: Create image metadata | ||
run: | | ||
echo ${{ env.image }} > snc-runner-image | ||
echo ${{ github.event_name }} > snc-runner-build-event | ||
- name: Upload snc-runner | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: snc-runner | ||
path: snc-runner* | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: snc-runner-pusher | ||
|
||
on: | ||
workflow_run: | ||
workflows: snc-runner-builder | ||
types: | ||
- completed | ||
|
||
jobs: | ||
push: | ||
name: push | ||
runs-on: ubuntu-24.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Download snc-runner assets | ||
id: download-gh-context-artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: snc-runner | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ github.token }} | ||
|
||
- name: Get snc-runner build informaiton | ||
run: | | ||
echo "source_event=$(cat snc-runner-build-event)" >> "$GITHUB_ENV" | ||
echo "image=$(cat snc-runner-image)" >> "$GITHUB_ENV" | ||
- name: Log in to ghcr.io for PR | ||
if: ${{ env.source_event == 'pull_request' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Log in to ghcr.io | ||
if: ${{ env.source_event == 'push' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Loginquay.io | ||
if: ${{ env.source_event == 'push' }} | ||
uses: redhat-actions/podman-login@v1 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_IO_USERNAME }} | ||
password: ${{ secrets.QUAY_IO_PASSWORD }} | ||
|
||
- name: Push snc-runner | ||
run: | | ||
make snc-runner-oci-load | ||
IMAGE=${{ env.image }} make snc-runner-oci-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Changelog | ||
|
||
## 1.0.0 | ||
|
||
* Initial version for managinig 2 types of builders | ||
* linux multi arch container based | ||
* windows and mac build on remote target | ||
|
||
|
Oops, something went wrong.