Coder Social home page Coder Social logo

stefh / ghaction-blazorwebassemblyfilehashfixer Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 1.0 36 KB

GitHub Action to fix the sha256 file-hashes from the resources defined in "blazor.boot.json" and "service-worker-assets.js".

License: MIT License

Shell 1.33% Dockerfile 2.34% C# 32.51% JavaScript 63.81%
webassembly blazor blazor-webassembly hashes sha256 fix

ghaction-blazorwebassemblyfilehashfixer's Introduction

ghaction-BlazorWebAssemblyFileHashFixer

GitHub Action to fix the sha256 file-hashes in:

  • blazor.boot.json
  • service-worker-assets.js

Why

In case you deploy your Blazor WebAssembly application on GitHub Pages and do one the modifications below:

The index.html and/or .js files are modified. And when running the Blazor WebAssembly using a service-worker, you can get this error in the console:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://stefh.github.io/xxx/index.html' with computed SHA-256 integrity '/C6AMmjXzNTqgqy8YOF4zcMbioqALgdg/bbhWojItcw='. The resource has been blocked.
Unknown error occurred while trying to verify integrity.
service-worker.js:1 Uncaught (in promise) TypeError: Failed to fetch

Solution

Use this GitHub Action to fix the SHA56 hashes in the blazor.boot.json and service-worker-assets.js files.

Usage

Inputs

wwwroot-path

Required The path to the wwwroot folder. Default this is ..

Example

- name: BlazorWebAssemblyFileHashFixer
  uses: stefh/ghaction-BlazorWebAssemblyFileHashFixer@v1
  with:
    wwwroot-path: ${{ env.PUBLISH_DIR }}

ghaction-blazorwebassemblyfilehashfixer's People

Contributors

stefh avatar

Stargazers

Boxiu Lee avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

lilsunny243

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.