From 877c58d57e8082033dfaeb718fe9ffc360c14474 Mon Sep 17 00:00:00 2001 From: Cassandra <145622947+cass-moz@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:31:39 -0800 Subject: [PATCH] feat(list): Add a step in the action to add version and commit info. Add a step within the github action that adds both VERSION and COMMIT info to the PSL list file. This fixes https://github.com/publicsuffix/list/issues/1808. --- .github/workflows/deploy-site.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/deploy-site.yaml b/.github/workflows/deploy-site.yaml index 141fe3d..3328f1d 100644 --- a/.github/workflows/deploy-site.yaml +++ b/.github/workflows/deploy-site.yaml @@ -41,6 +41,11 @@ jobs: repository: publicsuffix/list path: list + - name: Add VERSION and COMMIT to public_suffix_list.dat + working-directory: list/ + run: |- + awk -v commithash="$(git rev-parse HEAD)" -v date="$(date -u +'%Y-%m-%d_%H-%M-%S_%Z')" 'NR==8{print "// VERSION: "date; print "// COMMIT: "commithash; print ""} { print }' public_suffix_list.dat > newlist.dat && mv newlist.dat public_suffix_list.dat + - name: Authenticate with GCP uses: google-github-actions/auth@v0 with: