{"id":25451391,"url":"https://github.com/bagtoad/random-unsplash-action","last_synced_at":"2025-11-02T03:30:32.855Z","repository":{"id":217028327,"uuid":"742964194","full_name":"BagToad/random-unsplash-action","owner":"BagToad","description":"Get a random photo from Unsplash and display it in your README!","archived":false,"fork":false,"pushed_at":"2024-01-29T15:47:22.000Z","size":1284,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-01-29T18:30:21.268Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BagToad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-01-13T22:20:32.000Z","updated_at":"2024-01-18T19:07:35.000Z","dependencies_parsed_at":"2024-01-29T17:37:33.512Z","dependency_job_id":null,"html_url":"https://github.com/BagToad/random-unsplash-action","commit_stats":null,"previous_names":["bagtoad/random-unsplash-action"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2Frandom-unsplash-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2Frandom-unsplash-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2Frandom-unsplash-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BagToad%2Frandom-unsplash-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BagToad","download_url":"https://codeload.github.com/BagToad/random-unsplash-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239374652,"owners_count":19628044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T22:25:15.832Z","updated_at":"2025-11-02T03:30:32.815Z","avatar_url":"https://github.com/BagToad.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Random Unsplash Photo Action\n\nGet a random photo from Unsplash and display it in your README!\n\n# Example Usage\n\nThis action requires an Unsplash API access key. [Create a developer account](https://unsplash.com/documentation#creating-a-developer-account) to get an access key. \n\nRegister the access key as an [Actions secret ](https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository), and pass it to the action with the `unsplash_token` input.\n\n## Workflow\n```yaml\nname: Update README.md with random unsplash image\n\n# Controls when the workflow will run\non:\n  # Allows you to run this workflow manually from the Actions tab\n  workflow_dispatch:\n  # Run the workflow once a day at 6. PLEASE USE THIS ACTION RESPONSIBLY AND DO NOT ABUSE THE UNSPLASH API\n  schedule:\n    - cron: '0 6 * * *'\n\n# Required to write the README.md\npermissions:\n  contents: write\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      # Checks-out your repository\n      - uses: actions/checkout@v3\n      \n      # Use the unsplash \n      - name:  Update README.md with random Unsplash image\n        uses: bagtoad/random-unsplash-action@v1\n        with:\n            unsplash_token: ${{ secrets.UNSPLASH_TOKEN }} # Required\n            github_token: ${{ secrets.GITHUB_TOKEN }} # Required\n            template: ./template.md # Required\n            query: \"cats, magic, space\" # Optional\n```\n\n## Template File\n\n**Don't forget to provide attribution to the creator!!**\n\n```markdown\n### 👋 Welcome to my GitHub Profile!\n\n----\n\u003cdiv align=\"center\"\u003e\n\n## Photo of the day\n  \n  \u003ca href=\"{{ unsplash-page-url }}\"\u003e\u003cimg width=\"720\" src=\"{{ unsplash-raw-url }}\" alt=\"{{ unsplash-alt-description }}\"\u003e\u003c/a\u003e\n  \n  \u003cem\u003e{{ unsplash-alt-description }}\u003c/em\u003e\n  \n  \u003cem\u003e{{ unsplash-description }}\u003c/em\u003e\n\n  Photo by [{{ unsplash-name }}]({{ unsplash-portfolio-url }}) on [unsplash.com](https://unsplash.com/) • {{ socials }}\n  \n  Taken at {{ location }} • {{ google-maps }}\n  \n  ---\n  \n\u003cdetails\u003e\n\u003csummary\u003ePhotography Details\u003c/summary\u003e\n  \n| Parameter     | Value |\n| ------------- | ----- |\n| Camera Model  | {{ model }} |\n| Exposure Time | {{ exposure-time }} |\n| Aperture      | {{ aperture }} |\n| Focal Length  | {{ focal-length }} |\n| ISO           | {{ iso }} |\n| Location      | {{ location }} ({{ country }}) |\n| Coordinates   | Latitude {{ latitude }}, Longitude {{ longitude }} |\n\n\u003c/details\u003e\n\n\u003c/div\u003e\n\n----\n\n☝️ A random image is retrieved and posted to my profile daily via the [BagToad/random-unsplash-action](https://github.com/BagToad/random-unsplash-action) action!\n\n```\n\n# Action Inputs\n\n| Input Name      | Description                                         | Required | Default Value |\n| --------------- | --------------------------------------------------- | -------- | ------------- |\n| unsplash_token  | token to auth to unsplash                           | true     | -             |\n| github_token    | token to auth to github                             | true     | -             |\n| template        | template file to use                                | true     | -             |\n| orientation     | orientation of image (Valid values: landscape, portrait, squarish) | false    | 'landscape'   |\n| query           | query to search for                                 | false    | -             |\n| content_filter  | content filter (Valid values are low and high)      | false    | 'high'        |\n| collections     | collections to search within                        | false    | -             |\n| topics          | topics to search for                                | false    | -             |\n\nMore information can be found in [the Unsplash API docs](https://unsplash.com/documentation#get-a-random-photo)\n\n# Template Placeholders\n\n| Placeholder             | Description                                       |\n| ----------------------- | ------------------------------------------------- |\n| `{{ unsplash-raw-url }}`      | The raw file URL of the image from Unsplash                |\n| `{{ unsplash-page-url }}`     | A link to the photo on unsplash.com |\n| `{{ unsplash-alt-description }}` | The alt description of the image from Unsplash |\n| `{{ unsplash-description }}` | The description of the image from Unsplash      |\n| `{{ unsplash-name }}`     | The name of the image author from Unsplash        |\n| `{{ unsplash-portfolio-url }}` | The portfolio URL of the image author from Unsplash |\n| `{{ model }}` | The camera model used to take the photo |\n| `{{ exposure-time }}` | The exposure time of the photo |\n| `{{ aperture }}` | The aperture of the photo |\n| `{{ focal-length }}` | The focal length of the photo |\n| `{{ iso }}` | The ISO of the photo |\n| `{{ location }}` | The location where the photo was taken |\n| `{{ country }}` | The country where the photo was taken |\n| `{{ latitude }}` | The latitude of the location where the photo was taken |\n| `{{ longitude }}` | The longitude of the location where the photo was taken |\n| `{{ socials }}` | A markdown linked string of the creator's socials: \"instagram / portfolio / twitter\"\n\n\n# Legal\n\nThis action and the code contained is for educational purposes only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagtoad%2Frandom-unsplash-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbagtoad%2Frandom-unsplash-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbagtoad%2Frandom-unsplash-action/lists"}