Skip to content

.github/workflows/ci-release.yml #1

.github/workflows/ci-release.yml

.github/workflows/ci-release.yml #1

Workflow file for this run

name: CI Release Images
on:
workflow_call:
inputs:
repository:
description: 'Name of the repo to download files from'
type: string
run-id:
description: 'Id of the run to download files from'
type: string
name:
description: 'Artifact name to download'
type: string
workflow_dispatch:
inputs:
repository:
description: 'Name of the repo to download files from'
type: string
run-id:
description: 'Id of the run to download files from'
type: string
name:
description: 'Artifact name to download'
type: string
jobs:
image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download a Build Artifact
uses: actions/[email protected]
with:
repository: '${{ inputs.repository }}'
run-id: '${{ inputs.run-id }}'
name: '${{ inputs.name }}'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install CEKit
uses: cekit/[email protected]
- name: Create Dockerfile
env:
SERVER_ZIP: ${{ inputs.run-id }}.zip
run: |
pwd
ls
SERVER_OVERRIDE="{\"artifacts\":[{\"name\":\"server\",\"path\":\"${GITHUB_WORKSPACE}/${SERVER_ZIP}\"}]}"
cekit -v --descriptor server-openjdk.yaml build --overrides '{'version': '${{ github.sha }}'}' --overrides ${SERVER_OVERRIDE} --dry-run docker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Image
run: |
cat target/image/Dockerfile
docker buildx build --load -t localhost:5001/server:${{ github.sha }} target/image
docker save localhost:5001/server:${{ github.sha }} > /tmp/operand-image.tar
- name: Upload
uses: actions/upload-artifact@v4
with:
name: operand-image
path: /tmp/operand-image.tar