Skip to content

release [nightly, master] #84

release [nightly, master]

release [nightly, master] #84

Workflow file for this run

name: Release
run-name: |
release [${{github.ref_type == 'tag' && 'stable' || 'nightly' }}, ${{github.ref_name}}]
on:
push:
branches:
- master
tags:
- '*'
- '!*/**'
concurrency:
group: release-default-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
packages: write
env:
BASE_TAG: ubuntu:22.04
FLAVOR: default
TAG_SUFFIX: ''
UNO_MIDDLEWARE: ''
jobs:
config:
runs-on: ubuntu-latest
outputs:
BASE_TAG: ${{steps.config.outputs.BASE_TAG}}
DOCKER_FLAVOR_CONFIG: ${{steps.config.outputs.DOCKER_FLAVOR_CONFIG}}
DOCKER_TAGS_CONFIG: ${{steps.config.outputs.DOCKER_TAGS_CONFIG}}
FLAVOR: ${{steps.config.outputs.FLAVOR}}
TAG: ${{steps.config.outputs.TAG}}
UNO_MIDDLEWARE: ${{steps.config.outputs.UNO_MIDDLEWARE}}
steps:
- name: Clone uno
uses: actions/checkout@v4
with:
path: src/uno
submodules: true
- name: Configure build
id: config
run: |
case "${{github.ref_type}}" in
tag)
tag=latest
;;
branch)
tag=nightly
;;
esac
sha_short=$(cd src/uno && git rev-parse --short HEAD)
(
echo FLAVOR=${{env.FLAVOR}}
echo BASE_TAG=${{env.BASE_TAG}}
echo UNO_MIDDLEWARE=${{env.UNO_MIDDLEWARE}}
echo TAG=${{github.repository}}-test:${tag}${{env.TAG_SUFFIX}}
echo 'DOCKER_TAGS_CONFIG<<EOF'
if [ ${{ github.ref_type }} = branch ]; then
echo "type=raw,value=${tag},priority=650"
echo 'type=ref,event=branch'
fi
echo 'type=semver,pattern={{version}}'
echo 'type=semver,pattern={{major}}.{{minor}}'
echo 'type=semver,pattern={{major}}'
echo EOF
echo 'DOCKER_FLAVOR_CONFIG<<EOF'
echo 'suffix=${{env.TAG_SUFFIX}},onlatest=true'
echo EOF
) >> $GITHUB_OUTPUT
build:
needs: config
uses: ./.github/workflows/_release_build.yml
secrets: inherit
with:
uno-middleware: ${{ needs.config.outputs.UNO_MIDDLEWARE }}
base-tag: ${{ needs.config.outputs.BASE_TAG }}
tags-config: ${{ needs.config.outputs.DOCKER_TAGS_CONFIG }}
flavor-config: ${{ needs.config.outputs.DOCKER_FLAVOR_CONFIG }}
test:
needs:
- config
- build
strategy:
matrix:
platform: [amd64, arm64]
uses: ./.github/workflows/_release_test.yml
secrets: inherit
with:
tag: ${{needs.config.outputs.TAG}}
platform: ${{ matrix.platform }}
flavor: ${{ needs.config.outputs.FLAVOR }}
push:
needs:
- config
- test
uses: ./.github/workflows/_release_push.yml
secrets: inherit
with:
tag: ${{needs.config.outputs.TAG}}
flavor: ${{ needs.config.outputs.FLAVOR }}
tags-config: ${{ needs.config.outputs.DOCKER_TAGS_CONFIG }}
flavor-config: ${{ needs.config.outputs.DOCKER_FLAVOR_CONFIG }}
update_badges:
needs:
- config
- push
uses: ./.github/workflows/_release_badges.yml
secrets: inherit
with:
base-image: ${{ needs.config.outputs.BASE_TAG }}
flavor: ${{ needs.config.outputs.FLAVOR }}