Make WordPress Core


Ignore:
Timestamp:
01/22/2025 03:13:21 PM (15 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Improve the security and correctness of the GitHub Actions workflows files.

This includes removing use of dangerous inline GitHub Actions expressions, preventing word splitting, further tightening permissions, and generally improving many aspects of the workflows.

This also introduces a new workflow that runs Actionlint to detect incorrect and insecure code and configuration in workflow files.

Props johnbillion, swissspidy, flixos90, desrosj.

See #62221

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/install-testing.yml

    r59673 r59679  
    120120          php-version: '${{ matrix.php }}'
    121121          coverage: none
    122           tools: wp-cli${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && ':2.4.0' || '' }}
     122          tools: ${{ contains( fromJSON('["5.4", "5.5"]'), matrix.php ) && 'wp-cli:2.4.0' || 'wp-cli' }}
    123123
    124124      - name: Download WordPress
    125         run: wp core download ${{ inputs.wp-version && format( '--version={0}', inputs.wp-version ) || '--version=nightly' }}
     125        run: wp core download --version="${WP_VERSION}"
     126        env:
     127          WP_VERSION: ${{ inputs.wp-version || 'nightly' }}
    126128
    127129      - name: Create wp-config.php file
    128         run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost=127.0.0.1:${{ job.services.database.ports['3306'] }}
     130        run: wp config create --dbname=test_db --dbuser=root --dbpass=root --dbhost="127.0.0.1:${DB_PORT}"
     131        env:
     132          DB_PORT: ${{ job.services.database.ports['3306'] }}
    129133
    130134      - name: Install WordPress
    131         run: wp core ${{ matrix.multisite && 'multisite-' || '' }}install --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email
     135        run: wp core ${{ matrix.multisite && 'multisite-install' || 'install' }} --url=http://localhost/ --title="Upgrade Test" --admin_user=admin --admin_password=password --admin_email=me@example.org --skip-email
    132136
    133137  slack-notifications:
     
    176180              ref: 'trunk',
    177181              inputs: {
    178                 run_id: '${{ github.run_id }}'
     182                run_id: context.runId,
    179183              }
    180184            });
Note: See TracChangeset for help on using the changeset viewer.