Secrets Action
January 5, 2026 · View on GitHub
⏮️ Back to main README.md
Secrets Action
Usage
Important
A Gcore permanent API token is required to authorize access to the Gcore API.
name: Deploy
on:
workflow_dispatch:
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- id: deploy-secret
uses: gcore-github-actions/fastedge/secrets@v1
with:
api_key: ${{ secrets.GCORE_API_TOKEN }}
secret_name: 'my-new-secret'
secret_value: 'my-new-secret-value'
comment:
'Creates a basic secret that can then be used in applications'
- name: Use output
run: |
echo "secret_id: ${{ steps.deploy-secret.outputs.secret_id }}"
Note
This action runs using Node 20. If you are using self-hosted GitHub Actions runners, you must use a runner version that supports this version or newer.
Inputs
-
api_key- (required) A permanent API token that will authenticate the GitHub action to Gcore API. -
secret_name- (required) The unique name of the secret. -
secret_value- (optional) The value of the secret, will default to ( slot: 0 ). -
secret_id- (optional) The unique ID of the secret, when using this you are able to edit the name via the action. -
comment- (optional) The description of the secret. -
secret_slots- (optional) A JSON string representing a secret_slots array. -
api_url- (optional) Defaults to https://api.gcore.com
Usage: (secret_value vs secret_slots)
If you provide both, secret_slots will take precedence.
secret_value is purely a simple method of creating a valid secret_slots
array from simple input.
e.g.
secret_value: hello-world
will produce and insert a secret_slots array on your behalf:
[{ "slot": 0, "value": "hello-world" }]
Managing more complex secret_slots data, it is recommended to provide them as
repository secrets.
e.g.
secrets_slots: ${{ secrets.DATABASE_PASSWORD_SLOTS }}

Outputs
secret_id: The unique ID allocated to the secret.
CI/CD Runtime
Note
This action is configured to only make updates if it detects changes.
Development
- Copy and rename
.env.example.secrets>>.env.secrets. - Edit this
.env.secretsfile with yourAPI_KEYand other values you wish to use. - Run
npm run local-action:secretafter any change to test it using thetest-local-actionworkflow.
Note
Remember to call npm run all before committing your changes and pushing them
to remote.
Releasing
- Run the
./script/releasescript to create and push a new tag. - A workflow will run and generate a new draft release for you based on the tag you entered.
- Open the Releases page and go to the draft release.
- Make sure the
Publish this release to the GitHub Marketplacecheckbox is checked and changelog is correct. - Publish the new release.
- Move the major version tag (e.g. v1) to the latest patch release.