Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 5c22725

Browse files
authored
Merge pull request #39 from semiotic-ai/aasseman/ci-test-containers
ci: build test container images for PRs
2 parents d2054e8 + efc65f1 commit 5c22725

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- master
5+
6+
name: pr-container-build
7+
8+
jobs:
9+
container_build:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
packages: write
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-tags: true
18+
fetch-depth: 0
19+
20+
- name: git describe
21+
id: git-describe
22+
run: echo ::set-output name=git-describe::$(git describe --tags --always)
23+
24+
- name: Build Image
25+
id: build-image
26+
uses: redhat-actions/buildah-build@v2
27+
with:
28+
image: autoagora-processor
29+
tags: >
30+
pr-${{ github.event.number }}-${{ github.sha }}
31+
${{ steps.git-describe.outputs.git-describe }}
32+
containerfiles: |
33+
./Dockerfile
34+
- name: Push
35+
id: push-to-ghcr
36+
uses: redhat-actions/push-to-registry@v2
37+
with:
38+
image: ${{ steps.build-image.outputs.image }}
39+
tags: ${{ steps.build-image.outputs.tags }}
40+
registry: ghcr.io/${{ github.repository_owner }}
41+
username: ${{ github.actor }}
42+
password: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Print image url
44+
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}"

0 commit comments

Comments
 (0)