Update container.yaml workflow #3
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
name: Build Image | |
on: [push] | |
env: | |
IMAGE_NAME: pipelines-as-code-prow | |
IMAGE_TAGS: nightly ${{ github.sha }} | |
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} | |
REGISTRY_USER: ${{ github.actor }} | |
REGISTRY_PASSWORD: ${{ github.token }} | |
jobs: | |
build-image: | |
name: Build image without Containerfile | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" # Specify the Python version you need | |
- name: Build Image | |
id: build_image | |
uses: redhat-actions/buildah-build@v2 | |
with: | |
base-image: registry.access.redhat.com/ubi9/go-toolset # it has everything we need so let's use it | |
image: ${{ env.IMAGE_NAME }} | |
tags: ${{ env.IMAGE_TAGS }} | |
content: | | |
prow/ | |
entrypoint: python prow/prow.py | |
# Push the image to GHCR (Image Registry) | |
- name: Push To GHCR | |
uses: redhat-actions/push-to-registry@v2 | |
id: push | |
with: | |
image: ${{ steps.build_image.outputs.image }} | |
tags: ${{ steps.build_image.outputs.tags }} | |
registry: ${{ env.IMAGE_REGISTRY }} | |
username: ${{ env.REGISTRY_USER }} | |
password: ${{ env.REGISTRY_PASSWORD }} | |
- name: Echo outputs | |
run: | | |
echo "${{ toJSON(steps.push.outputs) }}" |