Upload your medias with Cloudinary Upload Github Action to Cloudinary SaaS solution for images and videos upload, storage, optimization and CDN.
Table of Contents
Add the following step to your workflow:
- name: Cloudinary Upload Image
uses: emmanuelgautier/cloudinary-upload-action@v2
with:
cloud-name: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
api-key: ${{ secrets.CLOUDINARY_API_KEY }}
api-secret: ${{ secrets.CLOUDINARY_API_SECRET }}
image: "./your-image.jpg"
You can upload multiple files with the images
parameter putting a file path pattern.
- name: Cloudinary Upload Images
uses: emmanuelgautier/cloudinary-upload-action@v2
with:
cloud-name: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
api-key: ${{ secrets.CLOUDINARY_API_KEY }}
api-secret: ${{ secrets.CLOUDINARY_API_SECRET }}
images: "./medias/**/*.jpg"
Or directly an array of files path.
- name: Cloudinary Upload Images
uses: emmanuelgautier/cloudinary-upload-action@v2
with:
cloud-name: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
api-key: ${{ secrets.CLOUDINARY_API_KEY }}
api-secret: ${{ secrets.CLOUDINARY_API_SECRET }}
images: "[\"./medias/images/test1.jpg\", \"./medias/images/test2.jpg\"]"
See action.yml for the full documentation for this action's inputs and outputs.
We recommend following Configuration Cloudinary Documentation for adding your credentials.
Emmanuel Gautier |
MIT © Emmanuel Gautier