0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 02:33:51 +01:00

Deal with some GHA deprecation warnings (#14216)

This commit is contained in:
David Robertson 2022-10-18 13:45:34 +01:00 committed by GitHub
parent 6c5082f3e0
commit a8677bc9b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -18,6 +18,13 @@
import json import json
import os import os
def set_output(key: str, value: str):
# See https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter
with open(os.environ["GITHUB_OUTPUT"], "at") as f:
print(f"{key}={value}", file=f)
IS_PR = os.environ["GITHUB_REF"].startswith("refs/pull/") IS_PR = os.environ["GITHUB_REF"].startswith("refs/pull/")
# First calculate the various trial jobs. # First calculate the various trial jobs.
@ -81,7 +88,7 @@ print("::endgroup::")
test_matrix = json.dumps( test_matrix = json.dumps(
trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests trial_sqlite_tests + trial_postgres_tests + trial_no_extra_tests
) )
print(f"::set-output name=trial_test_matrix::{test_matrix}") set_output("trial_test_matrix", test_matrix)
# First calculate the various sytest jobs. # First calculate the various sytest jobs.
@ -125,4 +132,4 @@ print(json.dumps(sytest_tests, indent=4))
print("::endgroup::") print("::endgroup::")
test_matrix = json.dumps(sytest_tests) test_matrix = json.dumps(sytest_tests)
print(f"::set-output name=sytest_test_matrix::{test_matrix}") set_output("sytest_test_matrix", test_matrix)

View file

@ -54,7 +54,7 @@ jobs:
esac esac
# finally, set the 'branch-version' var. # finally, set the 'branch-version' var.
echo "::set-output name=branch-version::$branch" echo "branch-version=$branch" >> "$GITHUB_OUTPUT"
# Deploy to the target directory. # Deploy to the target directory.
- name: Deploy to gh pages - name: Deploy to gh pages

View file

@ -34,7 +34,7 @@ jobs:
if [[ $GITHUB_REF == refs/tags/* ]]; then if [[ $GITHUB_REF == refs/tags/* ]]; then
dists=$(scripts-dev/build_debian_packages.py --show-dists-json) dists=$(scripts-dev/build_debian_packages.py --show-dists-json)
fi fi
echo "::set-output name=distros::$dists" echo "distros=$dists" >> "$GITHUB_OUTPUT"
# map the step outputs to job outputs # map the step outputs to job outputs
outputs: outputs:
distros: ${{ steps.set-distros.outputs.distros }} distros: ${{ steps.set-distros.outputs.distros }}

1
changelog.d/14216.misc Normal file
View file

@ -0,0 +1 @@
Update CI config to avoid GitHub Actions deprecation warnings.