Skip to content
play

GitHub Action

Sha256SumAction

v2 Latest version

Sha256SumAction

play

Sha256SumAction

Get file as input and prepare its sha256sum.txt file

Installation

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

              

- name: Sha256SumAction

uses: qlrd/sha256sum-action@v2

Learn more about this action in qlrd/sha256sum-action

Choose a version

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 }}