Skip to content

Conversation

@johnbillion
Copy link
Contributor

Description

This uses the WordPress Plugin Attestation action to generate a build provenance attestation for the zip file of Pods. This ties the zip file on wordpress.org back to the GitHub Actions workflow that performed the deployment.

Testing instructions

This isn't testable in isolation because the workflow only runs when you publish a release, but it's used by several other plugins.

Changelog text for these changes

Enhancement: A build provenance attestation is now generated for each deployment to the wordpress.org plugin directory. (@johnbillion)

@sc0ttkclark sc0ttkclark added this to the Pods 3.2.9 milestone May 1, 2025
@sc0ttkclark sc0ttkclark merged commit 8d21545 into pods-framework:main May 1, 2025
@sc0ttkclark
Copy link
Member

Thanks @johnbillion!

@sc0ttkclark
Copy link
Member

@sc0ttkclark
Copy link
Member

Run unzip -q -d zip-deployed "${PLUGIN}.zip"
  unzip -q -d zip-deployed "${PLUGIN}.zip"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    PLUGIN_VERSION: 
    PLUGIN_HOST: downloads.wordpress.org
    PLUGIN: pods
  
Run unzip -q -d zip-generated "${ZIP_PATH}"
  unzip -q -d zip-generated "${ZIP_PATH}"
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
  env:
    PLUGIN_VERSION: 
    PLUGIN_HOST: downloads.wordpress.org
    ZIP_PATH: 
unzip:  cannot find or open , .zip or .ZIP.

@johnbillion
Copy link
Contributor Author

I'll take a look

@johnbillion
Copy link
Contributor Author

@sc0ttkclark You're using 10up/action-wordpress-plugin-deploy@master but the master branch of that repo hasn't been updated in six years! So its inputs don't match the latest release. If you want the latest it needs to be the develop branch, but I would pin it to a version such as @2.3.0 for safety.

@johnbillion johnbillion deleted the build-provenance branch May 2, 2025 11:59
@sc0ttkclark
Copy link
Member

@johnbillion Doh! Thanks :) Updated for the next release.

@sc0ttkclark
Copy link
Member

@johnbillion just ran another build but it failed, the original PR here did not have the permissions set in the action too:

permissions:
  id-token: write
  attestations: write

Added for next time.

@johnbillion
Copy link
Contributor Author

Whoops I didn't follow my own instructions!

@szepeviktor
Copy link
Contributor

@sclark3-godaddy
Copy link

@szepeviktor it hasn't run yet, on the next release it should make it all the way through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants