Last active
January 15, 2025 20:00
-
-
Save mahendrapaipuri/42961a0bd17905e23e39f5f0ac863f46 to your computer and use it in GitHub Desktop.
Using act for testing GitHub workflows locally with artifacts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install artifacts server | |
git clone https://github.com/anthonykawa/artifact-server.git | |
npm install | |
# Start artifacts server with AUTH_KEY env var set | |
# By default this will start server on port 8080 | |
AUTH_KEY=foo npm run start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install act and run workflows | |
# Assuming we are in the root of the repo and workflow is defined in main.yaml file | |
act -W .github/workflows/main.yaml --env ACTIONS_RUNTIME_URL=http://localhost:8080/ --env ACTIONS_RUNTIME_TOKEN=foo | |
# Seems like we do not need to start artifact server seperately. We can directly pass artificat-server-path flag in CLI | |
act -W .github/workflows/main.yaml --artifact-server-path=/tmp/artifacts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment