Skip to content
shield

GitHub Action

Update Secret Action

v1.0.6 Latest version

Update Secret Action

shield

Update Secret Action

A GitHub Action to update a secret in a repository

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Update Secret Action

uses: punitkashyup/[email protected]

Learn more about this action in punitkashyup/action-secrets-update

Choose a version

Update Secret Action

A GitHub Action to easily update a secret in your repository using strong encryption.

Features

  • Securely update secrets in your GitHub repository.
  • Uses PyNaCl for encryption.
  • Straightforward setup and usage.

Usage

name: Update Secret

on:
  push:
    branches:
      - main

jobs:
  update_secret:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v2

    - name: Update Secret
      uses: punitkashyup/update-secret-action@v1
      with:
        repository_owner: ${{ secrets.REPOSITORY_OWNER }}
        repository_name: ${{ secrets.REPOSITORY_NAME }}
        secret_name: ${{ secrets.SECRET_NAME }}
        new_secret_value: ${{ secrets.NEW_SECRET_VALUE }}
        github_token: ${{ secrets.GITHUB_TOKEN }}