Skip to content
image

GitHub Action

Action Image Using Cloudinary

1.0.1 Latest version

Action Image Using Cloudinary

image

Action Image Using Cloudinary

Posts a image on actions (on the given line if provided), useful for CI/CD & End2End screenshots

Installation

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

              

- name: Action Image Using Cloudinary

uses: babu-izhan-5001312/actions-image@1.0.1

Learn more about this action in babu-izhan-5001312/actions-image

Choose a version

actions-image

Post a image on the pull request. Usefull for screenshots of failed E2E tests.

Requirements

If you encounter the "Resource not accessible by integration" you need to add the following permissions:

permissions:
    contents: write
    actions: read
    checks: write

Inputs

GITHUB_TOKEN - REQUIRED

The github token to perform api actions, can be set to ${{GITHUB_TOKEN}} or a custom one.

path - REQUIRED

The path to the image files, it supports glob. (Ex: ./my-image/**/*.png)

title - OPTIONAL

The title to display on the annotations (Ex: Failed E2E Tests)

uploadHost - OPTIONAL

Where to upload the pictures to (Default: cloudinary), uses form POST to upload.

cloud-name - REQUIRED if uploadHost is set to cloudinary

Cloudinary account name

api-key - REQUIRED if uploadHost is set to cloudinary

Cloudinary API Key

api-secret - REQUIRED if uploadHost is set to cloudinary

Cloudinary API Secret Key

Example usage

- name: Upload failed tests
  if: ${{ failure() }}
  uses: edunad/actions-image@v2.0.0
  with:
      path: './test/pics/**'
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      title: 'Meow 🙀'
      cloud-name: dqydn2j2x
      api-key: 155652779465454
      api-secret: ${{ secrets.CLOUDINARY_API_SECRET }}