Skip to content

Verify GitHub Artifacts #3

Verify GitHub Artifacts

Verify GitHub Artifacts #3

name: Verify GitHub Artifacts
on:
workflow_call:
inputs:
tag:
description: 'The tag version to use for verification'
required: true
type: string
workflow_dispatch:
inputs:
tag:
description: 'The tag version to use for verification'
required: true
type: string
permissions:
contents: read
packages: read
jobs:
seed:
runs-on: ubuntu-22.04
steps:
- id: seed
name: Set random seed
run: echo seed=$RANDOM >> $GITHUB_OUTPUT
outputs:
seed: ${{ inputs.seed || steps.seed.outputs.seed }}
verify-github-image:
runs-on: ubuntu-22.04
needs: [seed]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download and test GHCR image
run: |
# Login to GHCR
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Pull the test image
docker pull ghcr.io/resonatehq/resonate:${{ inputs.tag }}
# Run the test image
docker run --rm ghcr.io/resonatehq/resonate:${{ inputs.tag }} dst run --seed ${{ needs.seed.outputs.seed }} --aio-store sqlite
verify-github-release:
runs-on: ubuntu-22.04
needs: [seed]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download and test GH release
run: |
# Download the release artifact
curl -L -O "https://github.com/resonatehq/resonate/releases/download/${{ inputs.tag }}/resonate_linux_x86_64.tar.gz"
# Extract the artifact
tar -xzf resonate_linux_x86_64.tar.gz
# Run the extracted artifact
./resonate dst run --seed ${{ needs.seed.outputs.seed }} --aio-store sqlite