Skip to content
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

ci: build test container images for PRs #39

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/pr_container_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
on:
pull_request:
branches:
- master

name: pr-container-build

jobs:
container_build:
runs-on: ubuntu-latest
permissions:
packages: write

steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0

- name: git describe
id: git-describe
run: echo ::set-output name=git-describe::$(git describe --tags --always)

- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: autoagora-processor
tags: >
pr-${{ github.event.number }}-${{ github.sha }}
${{ steps.git-describe.outputs.git-describe }}
containerfiles: |
./Dockerfile
- name: Push
id: push-to-ghcr
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: ghcr.io/${{ github.repository_owner }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"
Loading