-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from etsauer/image-ci
WIP: Add some github workflows to build and publish images
- Loading branch information
Showing
7 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
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,46 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# This workflow gets called by other workflows | ||
workflow_call: | ||
inputs: | ||
image: | ||
required: true | ||
type: string | ||
tag: | ||
required: true | ||
type: string | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
build_and_push: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install CEKit | ||
uses: cekit/[email protected] | ||
|
||
# Runs a set of commands using the runners shell | ||
- name: Build base iamge | ||
run: | | ||
cekit build --overrides images/${{ inputs.image }}.yaml podman --tag=${{ inputs.tag }} | ||
# Runs a set of commands using the runners shell | ||
- name: Push Image | ||
env: | ||
USER: ${{ secrets.QUAY_ROBOT_USER }} | ||
TOKEN: ${{ secrets.QUAY_ROBOT_TOKEN }} | ||
REGISTRY: ${{ vars.REGISTRY_URL }} | ||
run: | | ||
podman login -u="${USER}" -p="${TOKEN}" ${REGISTRY} | ||
podman push ${{ inputs.tag }} |
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,30 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CD | ||
|
||
# Controls when the workflow will run | ||
on: | ||
# This workflow gets called by other workflows | ||
workflow_call: | ||
inputs: | ||
tag: | ||
required: true | ||
type: string | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install CEKit | ||
uses: cekit/[email protected] | ||
|
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,16 @@ | ||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build-images: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ['cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18'] | ||
uses: ./.github/workflows/cekit-build.yaml | ||
with: | ||
tag: quay.io/redhat-cop/${{ matrix.image }}:latest | ||
image: ${{ matrix.image }} | ||
secrets: inherit |
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,18 @@ | ||
# Controls when the workflow will run | ||
on: | ||
push: | ||
branches: ["image-ci"] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build-images: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ['cekit-builder', 'devspaces-base', 'devspaces-openjdk-17', 'devspaces-nodejs-18'] | ||
uses: ./.github/workflows/cekit-build.yaml | ||
with: | ||
tag: quay.io/redhat-cop/${{ matrix.image }}:pr-${{ github.sha }} | ||
image: ${{ matrix.image }} | ||
secrets: inherit |
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
File renamed without changes.