Skip to content

Get file as input and prepare its sha256sum.txt file

Notifications You must be signed in to change notification settings

qlrd/sha256sum-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Sha256Sum-Action

This action Get a gile as input and prepare its sha256sum.txt file.

Inputs

working-directory

Required The file's working directory that will be hashed.

file

Required The filenamein your repo to be hashed.

ext

The extension of sha256sum file. You can customize to sha256sum.txt, sha256.txt or anything you want

Outputs

hash-file

The path of hashed file.

Example usage

on:
  pull_request:
    branches:
      - main
jobs:
  sha256sum-action:
    runs-on: ubuntu-latest
    name: Test sha256sum-action
    steps:

      - name: Checkout
        uses: actions/checkout@v3

      - name: Sha256Sum Action
        uses: qlrd/sha256sum-action@v1.0.0
        id: hashing
        with:
          working-directory: ./test-data
          file: test.txt
          ext: 'sha256sum.txt'

      - name: Verify Hash
        run: cat ${{ steps.hashing.outputs.hash-file }} 

About

Get file as input and prepare its sha256sum.txt file

Resources

Stars

Watchers

Forks

Packages

No packages published