Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/muan/shortcuts-cfimages-action
Shortcuts → Cloudflare Images → GitHub Action
https://github.com/muan/shortcuts-cfimages-action
actions apple-shortcuts cloudflare-images
Last synced: 2 months ago
JSON representation
Shortcuts → Cloudflare Images → GitHub Action
- Host: GitHub
- URL: https://github.com/muan/shortcuts-cfimages-action
- Owner: muan
- Created: 2022-08-03T11:20:23.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-05T06:45:00.000Z (over 2 years ago)
- Last Synced: 2024-10-14T18:07:42.934Z (2 months ago)
- Topics: actions, apple-shortcuts, cloudflare-images
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# shortcuts-cfimages-action
This repository guides you through setting up a workflow to upload photos from your Apple device to Cloudflare Images, then trigger a GitHub Action which commits the upload response into your repository, for you to do whatever with; for example, you can use it to [build a RSS feed of photos](https://muan.co/photos.xml).
## Setup
Step 1: Sign up for [Cloudflare Images](https://www.cloudflare.com/products/cloudflare-images/).
Step 2: Fork this repository. Alternatively, set up a GitHub Action like [`commit.yml`](.github/workflows/commit.yml) to receive the uploaded image metadata. The Shortcut in the next step assumes you are using `commit.yml`, but it shouldn't be hard to customize.
Step 3: Install this [ Shortcut](https://www.icloud.com/shortcuts/accdd822b5c0461eaaf24c6219ed9699) and respond to setup questions with your Cloudflare credentials and the details of your GitHub Action.
### Cloudflare Images
Cloudflare Images costs $60/year, but it takes care of serving and resizing your images in the most optimal way. Alternatively, check out [muan/stories-feed-action](https://github.com/muan/stories-feed-action) which simply commits photos into your repository.
#### **Cloudflare API Token**
https://dash.cloudflare.com/profile/api-tokens → Create Token
#### **Cloudflare Images Account ID**
https://dash.cloudflare.com/ → Images → Developer Resources → Account ID
### `commit.yml` or a custom GitHub Action
This action takes the successful response from a Cloudflare Images upload, and appends it to a JSON file you specifiy.
### Shortcut
The shortcut does the following:
- Prompt to select photo
- Prompt for caption and alt text
- Upload photo to Cloudflare Images with the caption/alt as its metadata
- Trigger a `workflow_dispatch` event for a GitHub action with the response from the success uploadThe `workflow_dispatch` action depends on the [GitHub iOS app](https://apps.apple.com/app/github/id1477376905).