Hi everyone,
I’ve been working on some updates to the Snapcraft Build Action, and I’m looking for some folks to test it out.
This updated version includes a few features that should make your CI/CD pipelines for snaps much smoother.
Key Features
1. Arbitrary Environment Variable Pass-through
One of the main pain points has been passing secrets or configuration variables into the build environment. This version now checks the GitHub Actions environment and passes variables through to the LXD build environment (respecting a deny-list for sensitive system vars like PATH,HOME, etc.).
2. GitHub Actions Cache Support
You can now enable GitHub Actions Cache integration with a simple flag. This is particularly useful if you are using build tools like sccache to speed up your builds.
How to Test
You can try it out in your existing workflows by pointing to the master branch of my fork:
steps:
- uses: actions/checkout@v4
- uses: soumyaDghosh/action-build@master
with:
# Enable GitHub Cache
enable-github-cache: true
env:
# Pass your custom environment variables here
MY_API_KEY: ${{ secrets.MY_API_KEY }}
BUILD_CONFIG: "production"
I’d appreciate any feedback, especially regarding:
- Whether environment variables are arriving as expected in your build.
- If the caching mechanism is working correctly for your setup.
- Any regressions compared to the upstream action.
- If this is working perfectly for both amd64 and arm64 and self hosted runners.