Skip to content

init

init #40

Workflow file for this run

name: ubuntu-ppa
on:
workflow_dispatch:
inputs:
revision:
type: string
description: 'apptainer build revision'
required: true
default: '1'
pull_request:
push:
tags:
- 'v*.*.*'
jobs:
ubuntu_ppa_release:
name: ubuntu_ppa_release
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- version: '24.04'
name: noble
# - version: '22.04'
# name: jammy
# - version: '20.04'
# name: focal
steps:
- uses: actions/checkout@v4
- run: git fetch --prune --unshallow --tags --force
- name: Check if release is needed because tag matches latest annotated
env:
GITHUB_REF: ${{github.ref}}
run: |
GETVERSION="$(./scripts/get-version)"
GITTAG="${GITHUB_REF#refs/tags/v*}"
echo "$GETVERSION" "$GITTAG"
if [ "$GETVERSION" == "$GITTAG" ]
then
echo "do_release=true" >> $GITHUB_ENV
echo "build_tag=$GITTAG" >> $GITHUB_ENV
if [ -z "${{ inputs.revision }}" ]; then
echo "build_revision=1" >> $GITHUB_ENV
else
echo "build_revision=${{ inputs.revision }}" >> $GITHUB_ENV
fi
else
echo "Skipping because $GETVERSION did not match $GITTAG"
fi
- name: PPA build and push
if: env.do_release
env:
OS_TYPE: ubuntu
OS_VERSION: ${{matrix.version}}
OS_NAME: ${{matrix.name}}
GO_ARCH: linux-amd64
run: |
# checkout the branch
git checkout tags/"$build_tag"
go mod vendor
go mod tidy
# install necessary build dependencies
#sudo apt update && sudo apt install -y devscripts
# import gpg keys
#echo "${{ secrets.APPTAINRE_UBUNTU_PPA_PRIVATE_KEY }}" | gpg --batch --import --passphrase "${{ secrets.APPTAINRE_UBUNTU_PPA_PRIVATE_KEY_PASSPHRASE }}"
#export GPG_PASSPHRASE="${{ secrets.APPTAINRE_UBUNTU_PPA_PRIVATE_KEY_PASSPHRASE }}"
#gpg --list-keys
# run build script
#./scripts/ubuntu-ppa "$build_tag" "$build_revision"
# cleanup
#unset GPG_PASSPHRASE