Skip to content

Build test image

Build test image #30

Workflow file for this run

name: Build test image
on:
workflow_run:
workflows: ["Run checks"]
branches: [develop]
types:
- completed
env:
IMAGE_NAME: bitpart
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
release_version:
runs-on: ubuntu-latest
name: "Build test image"
steps:
- name: Check out
id: check_out
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ env.BRANCH_NAME }}
- name: Set timestamp
id: set_timestamp
run: echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV
- name: Buildah Action
id: build_image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056
with:
image: ${{ env.IMAGE_NAME }}
tags: develop-${{ github.sha }}-${{ env.TIMESTAMP}}
containerfiles: |
./Dockerfile
- name: Push To GHCR
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c
id: push
env:
IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }}
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
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 }}
extra-args: |
--disable-content-trust