Skip to content

Try building a release daily #771

Try building a release daily

Try building a release daily #771

# ======================================
# WARNING!
# THIS FILE IS GENERATED FROM A TEMPLATE
# DO NOT EDIT THIS FILE MANUALLY!
# ======================================
# The template is located in: try-release-daily.yml.j2
name: Try building a release daily
# Build a release tarball for all supported branches to verify the code is releasable.
on:
schedule:
- cron: 0 3 * * *
# be able to start this action manually from a actions tab when needed
workflow_dispatch:
permissions:
contents: read
jobs:
daily-release-test:
runs-on: [self-hosted, kstest]
# Don't run scheduled workflows on forks.
if: github.event_name != 'schedule' || github.repository == 'rhinstaller/anaconda'
strategy:
fail-fast: false
matrix:
branch: ['master', 'rhel-9', 'rhel-10']
steps:
- name: Check out repo
uses: actions/checkout@v4
with:
ref: ${{ matrix.branch }}
- name: Build anaconda container (to make the release)
run: |
make -f Makefile.am anaconda-release-build
- name: Run the build in the container
id: build
run: |
make -f Makefile.am container-release | tee release.log
- name: Check logs for malformed translations
if: ${{ steps.build.outcome == 'success' }}
run: |
errors=$(grep -E "Unable to compile [^:]+: .*" release.log || true) # grep exits with 1 if no lines found
if [ -n "$errors" ]; then
echo "Failed to compile some translations:"
echo "$errors"
exit 1
else
echo "No translation compilation errors found."
fi
- name: Check if translation files are present in tarball
if: ${{ always() && steps.build.outcome == 'success' }}
run: |
tarfiles=$(tar -tf anaconda-*.tar.bz2)
missing=0
required_languages="fr ja zh_CN es pt de ru ar"
# Languages that are presented first in the GUI.
# This list comes from langtable's list_common_languages, which in turn reportedly comes
# from gnome-control-center's cc_common_language_get_initial_languages.
if [[ "${{ matrix.branch }}" == *rhel-* ]]; then
required_languages="$required_languages ko it zh_TW"
# Additionally, we test languages that are supported and translated on RHEL.
fi
for translation in $required_languages ; do
if ! [[ $tarfiles == */po/$translation.po* ]]; then
echo "missing mandatory translation: $translation"
missing=1
fi
done
if [[ "$missing" == 0 ]]; then
echo "All mandatory translations found: $required_languages"
else
exit 1
fi