Skip to content

0.0.0

0.0.0 #1

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
run-tests:
uses: ./.github/workflows/tests.yml
secrets: inherit
check-version:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get sbx version
shell: bash
run: |
SBX_VER=$(cat VERSION)
echo "SBX_VER=$SBX_VER" >> $GITHUB_ENV
- id: get_version
uses: battila7/get-version-action@v2
- name: Check version
shell: bash
run: |
RELEASE_VERSION=${{ steps.get_version.outputs.version-without-v }}
echo "Release version: ${RELEASE_VERSION}"
echo "Sbx version: ${{ env.SBX_VER }}"
if [[ $RELEASE_VERSION == ${{ env.SBX_VER }} ]]; then
echo "Versions match, continuing..."
else
echo "Versions don't match, exiting..."
exit 1
fi
build-and-push-to-dockerhub:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
needs:
- run-tests
- check-version
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ctbushman/sbx_mapping
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: envs/sbx_mapping_env.Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
test-apptainer:
name: Apptainer Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set test env
run: echo "SUNBEAM_TEST_PROFILE=apptainer" >> $GITHUB_ENV
- uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.1.2
- name: Test with Sunbeam
uses: sunbeam-labs/sbx_test_action@v1
with:
test-directory: ".tests/e2e/"
- name: Dump Logs
shell: bash
if: always()
run: tail -n +1 logs/*
- name: Dump Stats
shell: bash
if: always()
run: cat stats/*