Skip to content

Commit

Permalink
Fix some more environment variable usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jan 20, 2025
1 parent e1116d1 commit bbd4469
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/reusable-cleanup-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ jobs:
COMMIT_MSG_RAW: ${{ github.event.head_commit.message }}
run: |
COMMIT_MESSAGE=$(echo "$COMMIT_MSG_RAW" | sed -n '/^Fixes #/,/\./p')
echo "fixed_list=$(echo \"$COMMIT_MESSAGE\" | sed -n 's/.*Fixes #\([0-9]\+\).*/\1/p' | tr '\n' ' ')" >> $GITHUB_OUTPUT
echo "fixed_list=$(echo "$COMMIT_MESSAGE" | sed -n 's/.*Fixes #\([0-9]\+\).*/\1/p' | tr '\n' ' ')" >> $GITHUB_OUTPUT
- name: Get the SVN revision
id: git-svn-id
env:
COMMIT_MSG_RAW: ${{ github.event.head_commit.message }}
run: |
COMMIT_MESSAGE=$(echo "$COMMIT_MSG_RAW" | sed -n '$p')
echo "svn_revision_number=$(echo \"$COMMIT_MESSAGE\" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> $GITHUB_OUTPUT
echo "svn_revision_number=$(echo "$COMMIT_MESSAGE" | sed -n 's/.*git-svn-id: https:\/\/develop.svn.wordpress.org\/[^@]*@\([0-9]*\) .*/\1/p')" >> $GITHUB_OUTPUT
- name: Find pull requests
id: linked-prs
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/reusable-performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,6 @@ jobs:
});
return baseRef.data.object.sha;
- name: Set commit details
# Only needed when publishing results.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
# Write to an environment variable to have the output available in later steps of the job.
run: echo "COMMITTED_AT=$(git show -s $GITHUB_SHA --format='%cI')" >> $GITHUB_ENV

- name: Publish performance results
# Only publish results on pushes to trunk.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
Expand All @@ -355,6 +349,7 @@ jobs:
echo "Performance results could not be published. 'CODEVITALS_PROJECT_TOKEN' is not set"
exit 1
fi
COMMITTED_AT="$(git show -s "$GITHUB_SHA" --format='%cI')"
node ./tests/performance/log-results.js "$CODEVITALS_PROJECT_TOKEN" trunk "$GITHUB_SHA" "$BASE_SHA" "$COMMITTED_AT" "$HOST_NAME"
- name: Ensure version-controlled files are not modified or deleted
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/reusable-phpunit-tests-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ jobs:
if: ${{ inputs.memcached }}
run: |
cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php
docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached
BASE=$(basename "$PWD")
docker run --name memcached --net "${BASE}_wpdevnet" -d memcached
- name: General debug information
run: |
Expand Down

0 comments on commit bbd4469

Please sign in to comment.