-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (39 loc) · 1.15 KB
/
pr_container_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 }}"