From 052b4785e902528eca2a1b3345a35163251550e3 Mon Sep 17 00:00:00 2001 From: Bruno Rocha Date: Thu, 3 Oct 2024 16:18:14 +0100 Subject: [PATCH] here we go again --- .github/workflows/backported-labels.yml | 64 +++--- .github/workflows/build_publish.yml | 160 +++++++-------- .../ci_automation_hub_collection.yml | 182 +++++++++--------- .github/workflows/ci_full.yml | 13 +- .github/workflows/ci_oci-env-integration.yml | 138 ++++++------- .github/workflows/ci_tdd.yml | 58 +++--- .github/workflows/i18n.yml | 166 ++++++++-------- .github/workflows/labeler.yml | 42 ++-- .../workflows/publish_local_junit_results.yml | 2 +- 9 files changed, 418 insertions(+), 407 deletions(-) diff --git a/.github/workflows/backported-labels.yml b/.github/workflows/backported-labels.yml index 92a6e2de6e..0e449c94f4 100644 --- a/.github/workflows/backported-labels.yml +++ b/.github/workflows/backported-labels.yml @@ -1,32 +1,32 @@ -name: 'Add backported-* labels' - -on: - # allow running manually - workflow_dispatch: - push: - branches: [ 'stable-*' ] - -jobs: - labels: - runs-on: ubuntu-latest - steps: - - name: 'Set $LABEL from branch name' - run: | - VERSION=`sed 's/^refs\/heads\/stable-//' <<< $GITHUB_REF` - LABEL="backported-${VERSION}" - echo "LABEL=${LABEL}" >> $GITHUB_ENV - - - uses: actions/checkout@v4 - - - name: 'Set $PR to PR number' - run: | - git log -1 --oneline - echo PR=`git log -1 --oneline | perl -ne 'print if s/^.*?\(#(\d+)\).*\(#\d+\).*$/$1/'` >> $GITHUB_ENV - - - name: "Add ${{ env.LABEL }} to #${{ env.PR }}" - if: ${{ env.PR }} - uses: actions-ecosystem/action-add-labels@v1 - with: - labels: ${{ env.LABEL }} - number: ${{ env.PR }} - github_token: ${{ secrets.GITHUB_TOKEN }} +# name: 'Add backported-* labels' +# +# on: +# # allow running manually +# workflow_dispatch: +# push: +# branches: [ 'stable-*' ] +# +# jobs: +# labels: +# runs-on: ubuntu-latest +# steps: +# - name: 'Set $LABEL from branch name' +# run: | +# VERSION=`sed 's/^refs\/heads\/stable-//' <<< $GITHUB_REF` +# LABEL="backported-${VERSION}" +# echo "LABEL=${LABEL}" >> $GITHUB_ENV +# +# - uses: actions/checkout@v4 +# +# - name: 'Set $PR to PR number' +# run: | +# git log -1 --oneline +# echo PR=`git log -1 --oneline | perl -ne 'print if s/^.*?\(#(\d+)\).*\(#\d+\).*$/$1/'` >> $GITHUB_ENV +# +# - name: "Add ${{ env.LABEL }} to #${{ env.PR }}" +# if: ${{ env.PR }} +# uses: actions-ecosystem/action-add-labels@v1 +# with: +# labels: ${{ env.LABEL }} +# number: ${{ env.PR }} +# github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build_publish.yml b/.github/workflows/build_publish.yml index ae4dc7a08c..73eb73a16a 100644 --- a/.github/workflows/build_publish.yml +++ b/.github/workflows/build_publish.yml @@ -1,80 +1,80 @@ ---- -name: "Build and publish galaxy_ng package" - -on: - release: - types: [published] - tags: - - '*' - branches: - - 'stable-*' - -jobs: - - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - - - name: Get galaxy_ng package version - shell: bash - run: echo "galaxy_ng_version=$(python3 setup.py --version)" >> $GITHUB_ENV - - - name: Validate tag and galaxy_ng version match - shell: bash - if: env.galaxy_ng_version != github.ref_name - run: | - echo "::error::Tag ${{ github.ref_name }} and galaxy_ng version ${{ env.galaxy_ng_version }} doesn't match." - exit 1 - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools - - - name: Upgrade pip - run: pip install pip --upgrade - - - name: Install galaxy_ng editable - run: pip install -e . - - # set variable for the next step, so only versions higher than 4.4 gets translated - # 4.2 and 4.3 don't support translations - - name: Check galaxy_ng version for translations - shell: bash - id: version_check - run: | - is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)') - echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT - - - name: Build API translations - shell: bash - run: "django-admin compilemessages" - if: steps.version_check.outputs.is_translatable == 'True' - - - name: Check if UI has corresponding tag - shell: bash - run: | - status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s) - if [ $status_code == "404" ] - then - echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found." - exit 1 - fi - - - name: Build galaxy_ng python packages - run: "python3 setup.py sdist bdist_wheel" - - - name: Install twine - run: "pip install twine" - - - name: Publish galaxy_ng to PyPI - run: "python3 -m twine upload dist/*" - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.PYPI_RELEASE_TOKEN }} +# --- +# name: "Build and publish galaxy_ng package" +# +# on: +# release: +# types: [published] +# tags: +# - '*' +# branches: +# - 'stable-*' +# +# jobs: +# +# build: +# runs-on: ubuntu-latest +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Set up Python +# uses: actions/setup-python@v4 +# +# - name: Get galaxy_ng package version +# shell: bash +# run: echo "galaxy_ng_version=$(python3 setup.py --version)" >> $GITHUB_ENV +# +# - name: Validate tag and galaxy_ng version match +# shell: bash +# if: env.galaxy_ng_version != github.ref_name +# run: | +# echo "::error::Tag ${{ github.ref_name }} and galaxy_ng version ${{ env.galaxy_ng_version }} doesn't match." +# exit 1 +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools +# +# - name: Upgrade pip +# run: pip install pip --upgrade +# +# - name: Install galaxy_ng editable +# run: pip install -e . +# +# # set variable for the next step, so only versions higher than 4.4 gets translated +# # 4.2 and 4.3 don't support translations +# - name: Check galaxy_ng version for translations +# shell: bash +# id: version_check +# run: | +# is_translatable=$(python -c 'from pkg_resources import parse_version; cmp_res = parse_version("${{ env.galaxy_ng_version }}") >= parse_version("4.4"); print(cmp_res)') +# echo "is_translatable=$is_translatable" >> $GITHUB_OUTPUT +# +# - name: Build API translations +# shell: bash +# run: "django-admin compilemessages" +# if: steps.version_check.outputs.is_translatable == 'True' +# +# - name: Check if UI has corresponding tag +# shell: bash +# run: | +# status_code=$(curl -LI https://api.github.com/repos/ansible/ansible-hub-ui/releases/tags/${{ env.galaxy_ng_version }} -o /dev/null -w '%{http_code}\n' -s) +# if [ $status_code == "404" ] +# then +# echo "::error::Corresponding tag ${{ env.galaxy_ng_version }} for ansible-hub-ui not found." +# exit 1 +# fi +# +# - name: Build galaxy_ng python packages +# run: "python3 setup.py sdist bdist_wheel" +# +# - name: Install twine +# run: "pip install twine" +# +# - name: Publish galaxy_ng to PyPI +# run: "python3 -m twine upload dist/*" +# env: +# TWINE_USERNAME: __token__ +# TWINE_PASSWORD: ${{ secrets.PYPI_RELEASE_TOKEN }} diff --git a/.github/workflows/ci_automation_hub_collection.yml b/.github/workflows/ci_automation_hub_collection.yml index 5bc5cda8ca..25c6143012 100644 --- a/.github/workflows/ci_automation_hub_collection.yml +++ b/.github/workflows/ci_automation_hub_collection.yml @@ -1,91 +1,91 @@ ---- -name: Galaxy Collection CI -on: - pull_request: - branches: - - "*" - paths-ignore: - - "CHANGES/**" - - "docs/**" - - "mkdocs.yml" - push: - branches: - - "*" - workflow_dispatch: - -jobs: - galaxy_collection: - runs-on: ubuntu-latest - steps: - - name: Checkout galaxy_ng - uses: actions/checkout@v4 - - - name: Setup python - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - - name: (Linux) Install docker compose - run: | - curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 - install /tmp/docker-compose /usr/local/bin/ - - - name: install ansible - run: pip3 install ansible - - - name: Checkout the ansible_hub collection - uses: actions/checkout@v4 - with: - repository: ansible-collections/ansible_hub - path: ansible_hub - - - name: copy galaxy.yml.j2 to ansible_hub - run: | - cp dev/galaxy_collection_plays/galaxy.yml.j2 ansible_hub - - - name: Build and install the collection - working-directory: ansible_hub - run: | - # The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running. - rm -f ansible.cfg - rm -f galaxy.yml - ansible all -i localhost, -c local -m template -a "src=galaxy.yml.j2 dest=galaxy.yml" -e collection_namespace=ansible -e collection_name=hub -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible-collections/ansible_hub - ansible-galaxy collection build -vvv - ansible-galaxy collection install ansible-hub-1.0.0.tar.gz -vvv - - - name: set env vars - run: | - echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV - echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV - echo "OCI_VERBOSE=1" >> $GITHUB_ENV - echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV - - - name: setup oci-env - run: | - git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH - pip install -e $OCI_ENV_PATH/client/ - mkdir $OCI_ENV_PATH/db_backup/ - - - name: run the standalone stack detached - run: OCI_COMPOSE_DETACH=1 make oci/standalone - - - name: wait for the system to start - run: make oci/standalone/poll - - - name: create the test users+data - run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng; django-admin shell < ./dev/common/setup_test_data.py' - - - name: make messages - run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng/galaxy_ng; django-admin makemessages --all' - - - name: Test the user playbook - run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv - - - name: Test the content playbook - run: ansible-playbook dev/galaxy_collection_plays/content.yml -vvv - - - name: Test the repo playbook - run: ansible-playbook dev/galaxy_collection_plays/repo.yml -vvv - - - name: Test the ee playbook - run: ansible-playbook dev/galaxy_collection_plays/ee.yml -vvv +# --- +# name: Galaxy Collection CI +# on: +# pull_request: +# branches: +# - "*" +# paths-ignore: +# - "CHANGES/**" +# - "docs/**" +# - "mkdocs.yml" +# push: +# branches: +# - "*" +# workflow_dispatch: +# +# jobs: +# galaxy_collection: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout galaxy_ng +# uses: actions/checkout@v4 +# +# - name: Setup python +# uses: actions/setup-python@v4 +# with: +# python-version: "3.11" +# +# - name: (Linux) Install docker compose +# run: | +# curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 +# install /tmp/docker-compose /usr/local/bin/ +# +# - name: install ansible +# run: pip3 install ansible +# +# - name: Checkout the ansible_hub collection +# uses: actions/checkout@v4 +# with: +# repository: ansible-collections/ansible_hub +# path: ansible_hub +# +# - name: copy galaxy.yml.j2 to ansible_hub +# run: | +# cp dev/galaxy_collection_plays/galaxy.yml.j2 ansible_hub +# +# - name: Build and install the collection +# working-directory: ansible_hub +# run: | +# # The ansible.cfg defined in the collection repository might break the test. We want the same variables for installation and running. +# rm -f ansible.cfg +# rm -f galaxy.yml +# ansible all -i localhost, -c local -m template -a "src=galaxy.yml.j2 dest=galaxy.yml" -e collection_namespace=ansible -e collection_name=hub -e collection_version=1.0.0 -e collection_repo=https://github.com/ansible-collections/ansible_hub +# ansible-galaxy collection build -vvv +# ansible-galaxy collection install ansible-hub-1.0.0.tar.gz -vvv +# +# - name: set env vars +# run: | +# echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV +# echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV +# echo "OCI_VERBOSE=1" >> $GITHUB_ENV +# echo "GH_DUMP_LOGS=0" >> $GITHUB_ENV +# +# - name: setup oci-env +# run: | +# git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH +# pip install -e $OCI_ENV_PATH/client/ +# mkdir $OCI_ENV_PATH/db_backup/ +# +# - name: run the standalone stack detached +# run: OCI_COMPOSE_DETACH=1 make oci/standalone +# +# - name: wait for the system to start +# run: make oci/standalone/poll +# +# - name: create the test users+data +# run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng; django-admin shell < ./dev/common/setup_test_data.py' +# +# - name: make messages +# run: docker exec -t ci-standalone-pulp-1 bash -c 'cd /src/galaxy_ng/galaxy_ng; django-admin makemessages --all' +# +# - name: Test the user playbook +# run: ansible-playbook dev/galaxy_collection_plays/user.yml -vvv +# +# - name: Test the content playbook +# run: ansible-playbook dev/galaxy_collection_plays/content.yml -vvv +# +# - name: Test the repo playbook +# run: ansible-playbook dev/galaxy_collection_plays/repo.yml -vvv +# +# - name: Test the ee playbook +# run: ansible-playbook dev/galaxy_collection_plays/ee.yml -vvv diff --git a/.github/workflows/ci_full.yml b/.github/workflows/ci_full.yml index 36aafbb3d9..2de7aacab2 100644 --- a/.github/workflows/ci_full.yml +++ b/.github/workflows/ci_full.yml @@ -48,6 +48,17 @@ jobs: - name: Check for gettext problems run: sh .ci/scripts/check_gettext.sh + + event_file: + name: "Event File" + runs-on: ubuntu-latest + steps: + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: Event File + path: ${{ github.event_path }} + test: runs-on: ubuntu-latest steps: @@ -92,7 +103,7 @@ jobs: - name: Upload Test Results if: always() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Unit Test Results path: | diff --git a/.github/workflows/ci_oci-env-integration.yml b/.github/workflows/ci_oci-env-integration.yml index 45e6d3b654..75c5a5f1ab 100644 --- a/.github/workflows/ci_oci-env-integration.yml +++ b/.github/workflows/ci_oci-env-integration.yml @@ -1,69 +1,69 @@ ---- -name: OCI Env Integration -on: - pull_request: - branches: - - '**' - push: - branches: - - '**' - workflow_dispatch: - -jobs: - integration: - strategy: - fail-fast: false - matrix: - env: - - TEST_PROFILE: ldap - - TEST_PROFILE: keycloak - - TEST_PROFILE: standalone - # - TEST_PROFILE: rbac - - TEST_PROFILE: rbac_parallel_group_1 - - TEST_PROFILE: rbac_parallel_group_2 - - TEST_PROFILE: certified-sync - - TEST_PROFILE: insights - - TEST_PROFILE: iqe_rbac - - TEST_PROFILE: x_repo_search - - TEST_PROFILE: community - - TEST_PROFILE: dab_jwt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v4 - with: - python-version: "3.10" - - - name: (Linux) Install docker compose - run: | - curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 - install /tmp/docker-compose /usr/local/bin/ - - # Note: COMPOSE_INTERACTIVE_NO_CLI=1 is required for oci-env to work correctly when there's no interactive terminal - - name: Set environment variables - run: | - echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV - echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV - echo "OCI_VERBOSE=1" >> $GITHUB_ENV - echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential - - - name: setup oci-env - run: | - git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH - pip install -e $OCI_ENV_PATH/client/ - mkdir $OCI_ENV_PATH/db_backup/ - - - name: run integration tests - if: ${{ !startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} - run: make gh-action/${{ matrix.env.TEST_PROFILE }} - - - name: run parallel rbac integration tests - if: ${{ startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} - run: make gh-action/rbac-parallel RBAC_PARALLEL_GROUP=${{ matrix.env.TEST_PROFILE }} +# --- +# name: OCI Env Integration +# on: +# pull_request: +# branches: +# - '**' +# push: +# branches: +# - '**' +# workflow_dispatch: +# +# jobs: +# integration: +# strategy: +# fail-fast: false +# matrix: +# env: +# - TEST_PROFILE: ldap +# - TEST_PROFILE: keycloak +# - TEST_PROFILE: standalone +# # - TEST_PROFILE: rbac +# - TEST_PROFILE: rbac_parallel_group_1 +# - TEST_PROFILE: rbac_parallel_group_2 +# - TEST_PROFILE: certified-sync +# - TEST_PROFILE: insights +# - TEST_PROFILE: iqe_rbac +# - TEST_PROFILE: x_repo_search +# - TEST_PROFILE: community +# - TEST_PROFILE: dab_jwt +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.10" +# +# - name: (Linux) Install docker compose +# run: | +# curl -L -o /tmp/docker-compose https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-linux-x86_64 +# install /tmp/docker-compose /usr/local/bin/ +# +# # Note: COMPOSE_INTERACTIVE_NO_CLI=1 is required for oci-env to work correctly when there's no interactive terminal +# - name: Set environment variables +# run: | +# echo "OCI_ENV_PATH=${HOME}/work/galaxy_ng/oci_env" >> $GITHUB_ENV +# echo "COMPOSE_INTERACTIVE_NO_CLI=1" >> $GITHUB_ENV +# echo "OCI_VERBOSE=1" >> $GITHUB_ENV +# echo "GH_DUMP_LOGS=1" >> $GITHUB_ENV +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev python3 libldap2-dev libssl-dev build-essential +# +# - name: setup oci-env +# run: | +# git clone https://github.com/pulp/oci_env.git $OCI_ENV_PATH +# pip install -e $OCI_ENV_PATH/client/ +# mkdir $OCI_ENV_PATH/db_backup/ +# +# - name: run integration tests +# if: ${{ !startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} +# run: make gh-action/${{ matrix.env.TEST_PROFILE }} +# +# - name: run parallel rbac integration tests +# if: ${{ startsWith(matrix.env.TEST_PROFILE, 'rbac_parallel_group') }} +# run: make gh-action/rbac-parallel RBAC_PARALLEL_GROUP=${{ matrix.env.TEST_PROFILE }} diff --git a/.github/workflows/ci_tdd.yml b/.github/workflows/ci_tdd.yml index 83fb490563..ab41a61306 100644 --- a/.github/workflows/ci_tdd.yml +++ b/.github/workflows/ci_tdd.yml @@ -1,29 +1,29 @@ ---- -name: TDD -on: - pull_request: - branches: - - '*' - workflow_dispatch: - -jobs: - - validation: - runs-on: ubuntu-latest - steps: - - - uses: actions/setup-python@v4 - with: - python-version: "3.8" - - - uses: actions/checkout@v4 - - - name: Ensure changes were made to tests - env: - PY_COLORS: '1' - GITHUB_PR_NUMBER: ${{github.event.number}} - GITHUB_BASE_REF: ${{ github.base_ref }} - GITHUB_BRANCH: ${{ github.head_ref }} - GITHUB_USER: ${{ github.event.pull_request.user.login }} - GITHUB_CONTEXT: ${{ toJson(github) }} - run: python dev/common/tdd.py +# --- +# name: TDD +# on: +# pull_request: +# branches: +# - '*' +# workflow_dispatch: +# +# jobs: +# +# validation: +# runs-on: ubuntu-latest +# steps: +# +# - uses: actions/setup-python@v4 +# with: +# python-version: "3.8" +# +# - uses: actions/checkout@v4 +# +# - name: Ensure changes were made to tests +# env: +# PY_COLORS: '1' +# GITHUB_PR_NUMBER: ${{github.event.number}} +# GITHUB_BASE_REF: ${{ github.base_ref }} +# GITHUB_BRANCH: ${{ github.head_ref }} +# GITHUB_USER: ${{ github.event.pull_request.user.login }} +# GITHUB_CONTEXT: ${{ toJson(github) }} +# run: python dev/common/tdd.py diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 452947fc1a..8774ce0574 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -1,83 +1,83 @@ ---- -name: "[i18n] Update translations" - -on: - # allow running manually - workflow_dispatch: - # run weekly - schedule: - - cron: '30 5 1 * *' - -jobs: - i18n: - runs-on: ubuntu-latest - - strategy: - matrix: - branch: - - 'master' - - 'stable-4.9' - - 'stable-4.10' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ matrix.branch }} - - - name: Set up Python - uses: actions/setup-python@v4 - - - name: Update apt - run: sudo apt -y update - - - name: Install LDAP requirements - run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools - - - name: Upgrade pip - run: pip install pip --upgrade - - - name: Install galaxy_ng editable - run: pip install -e . - - - name: Extract strings - run: | - cd galaxy_ng - django-admin makemessages --all - - - name: Check if files were updated - run: | - filesChanged=$(git diff --ignore-matching-lines=POT-Creation-Date) - if [ -z "$filesChanged" ] - then - echo "openPR=false" >> $GITHUB_ENV - else - echo "openPR=true" >> $GITHUB_ENV - fi - shell: bash - - - name: Clear fuzzy entries - run: bash .github/workflows/scripts/clear_fuzzy_entries.sh - - - name: Compile strings - run: | - cd galaxy_ng - django-admin compilemessages - - - name: Set current date as env variable - run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV - - - name: Create a Pull Request (only if files were updated) - if: env.openPR == 'true' - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.GITHUB_TOKEN }} - committer: ansible - author: ansible - commit-message: | - Automated updated of i18n strings on ${{ env.NOW }} - No-Issue - body: | - No-Issue - title: "[i18n] Update translations ${{ env.NOW }}" - branch: i18n/${{ matrix.branch }}/update-translations-${{ env.NOW }} - base: ${{ matrix.branch }} +# --- +# name: "[i18n] Update translations" +# +# on: +# # allow running manually +# workflow_dispatch: +# # run weekly +# schedule: +# - cron: '30 5 1 * *' +# +# jobs: +# i18n: +# runs-on: ubuntu-latest +# +# strategy: +# matrix: +# branch: +# - 'master' +# - 'stable-4.9' +# - 'stable-4.10' +# +# steps: +# - uses: actions/checkout@v4 +# with: +# ref: ${{ matrix.branch }} +# +# - name: Set up Python +# uses: actions/setup-python@v4 +# +# - name: Update apt +# run: sudo apt -y update +# +# - name: Install LDAP requirements +# run: sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev build-essential gettext python-setuptools +# +# - name: Upgrade pip +# run: pip install pip --upgrade +# +# - name: Install galaxy_ng editable +# run: pip install -e . +# +# - name: Extract strings +# run: | +# cd galaxy_ng +# django-admin makemessages --all +# +# - name: Check if files were updated +# run: | +# filesChanged=$(git diff --ignore-matching-lines=POT-Creation-Date) +# if [ -z "$filesChanged" ] +# then +# echo "openPR=false" >> $GITHUB_ENV +# else +# echo "openPR=true" >> $GITHUB_ENV +# fi +# shell: bash +# +# - name: Clear fuzzy entries +# run: bash .github/workflows/scripts/clear_fuzzy_entries.sh +# +# - name: Compile strings +# run: | +# cd galaxy_ng +# django-admin compilemessages +# +# - name: Set current date as env variable +# run: echo "NOW=$(date +'%Y-%m-%d')" >> $GITHUB_ENV +# +# - name: Create a Pull Request (only if files were updated) +# if: env.openPR == 'true' +# uses: peter-evans/create-pull-request@v5 +# with: +# token: ${{ secrets.GITHUB_TOKEN }} +# committer: ansible +# author: ansible +# commit-message: | +# Automated updated of i18n strings on ${{ env.NOW }} +# No-Issue +# body: | +# No-Issue +# title: "[i18n] Update translations ${{ env.NOW }}" +# branch: i18n/${{ matrix.branch }}/update-translations-${{ env.NOW }} +# base: ${{ matrix.branch }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index fe90ab1091..990b418160 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,21 +1,21 @@ -# Add labels to pull requests against master -# uses logic in .github/labeler.yml - ---- -name: "Add labels to pull request" - -on: - pull_request_target: - branches: [ "master" ] - types: [ "opened" ] - -jobs: - triage: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v4 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" +# # Add labels to pull requests against master +# # uses logic in .github/labeler.yml +# +# --- +# name: "Add labels to pull request" +# +# on: +# pull_request_target: +# branches: [ "master" ] +# types: [ "opened" ] +# +# jobs: +# triage: +# permissions: +# contents: read +# pull-requests: write +# runs-on: ubuntu-latest +# steps: +# - uses: actions/labeler@v4 +# with: +# repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/publish_local_junit_results.yml b/.github/workflows/publish_local_junit_results.yml index 962791b91c..f2b20cfd9f 100644 --- a/.github/workflows/publish_local_junit_results.yml +++ b/.github/workflows/publish_local_junit_results.yml @@ -29,7 +29,7 @@ jobs: done - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 with: commit: ${{ github.event.workflow_run.head_sha }} event_file: artifacts/Event File/event.json