.github/workflows/ci-release.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
with: | |
repository: 'rigazilla/infinispan-images' | |
- 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.name }}.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 tag localhost:5001/server:${{ github.sha }} quay.io/rigazilla/infinispan-server:test-${{ github.run_id}} | |
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 | |
- name: Push to Quay.io | |
uses: opspresso/action-docker@master | |
with: | |
args: --docker | |
env: | |
USERNAME: rigazilla+ghimages | |
PASSWORD: ${{ secrets.QUAY_IO_PASSWORD }} | |
REGISTRY: "quay.io/rigazilla" | |
TAG_NAME: test-${{ github.run_id }} | |
IMAGE_NAME: infinispan-server |