Are You Awake Yet Action
@dataeducator がすでに取り組んでいます。
2023年11月8日 から。
評価
この issue はまだ評価されていません。
説明
Part of the OSS Architecture track
Task
- Within the workflows directory, add and configure the are you awake yet action for this project from this work in progress PR https://github.com/ProgramEquity/amplify/pull/447
- Add inline comments
Suggestions: try this prompt with Copilot "how to create a spellcheck GitHub Action like this one https://github.com/marketplace/actions/are-they-awake-yet"
Or you can debug the following output:
To create a GitHub Action in your ProgramEquity/amplify repository like the "Are They Awake Yet?" action, you can follow these steps:
-
Create a new GitHub repository for your action.
-
Create a new file in your repository called Dockerfile with the following contents:
RUN apk add --no-cache curl
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
This Dockerfile sets up a Node.js environment and installs the curl package. It also copies the entrypoint.sh script to the container and sets it as the entrypoint.
- Create a new file in your repository called entrypoint.sh with the following contents:
#!/bin/sh -l
curl -s https://awake-api.herokuapp.com/awake/$1 | grep -q "true"
if [ $? -eq 0 ]; then
echo "$1 is awake!"
exit 0
else
echo "$1 is asleep :("
exit 1
fi
This shell script is the entrypoint for the Docker container. It uses the curl command to make a request to the "Are They Awake Yet?" API with the specified URL. It then uses grep to check if the response contains the string "true". If the URL is awake, it prints a success message and exits with code 0. If the URL is asleep, it prints a failure message and exits with code 1.
Create a new file in your repository called action.yml with the following contents:
name: Are They Awake Yet?
description: Check if a website is awake
inputs:
url:
description: 'The URL to check'
required: true
runs:
using: 'docker'
image: 'Dockerfile'
This YAML file defines the GitHub Action. It specifies the name and description of the action, as well as an input for the URL to check. It also specifies that the action should run using Docker, and sets the Docker image to the Dockerfile we created earlier.
Commit and push your changes to the repository.
Use the actions/checkout action to check out the repository in your workflow.
Use the ProgramEquity/amplifyaction to run the "Are They Awake Yet?" action in your workflow, passing the URL to check as an input.
Resources:
- What is an Action
- Our current workflows
- Getting started with GitHub Actions
- How to use Copilot to write your action recording
- If you're done with your task and want to suggest one of your own, check out marketplace
- 主要言語
- JavaScript
- スター
- 123
- フォーク
- 101
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OpenSourceFellows/amplify のほかの issue
-
QA Bug Part 2 Update Axios-cache-Interception対応中かも @SAUMILDHANKAR が 383 日前に担当しました。 オープンbug Failing workflow check
OpenSourceFellows/amplify#1077 · コメント 4 件 · 担当者 2 名 ·
-
Auto messages for Pull Request再び着手できるかも @Alex-is-Gonzalez が 383 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
OpenSourceFellows/amplify#1076 · コメント 2 件 · 担当者 1 名 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
OpenSourceFellows/amplify#1075 ·
-
new contributor
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
OpenSourceFellows/amplify#1059 · コメント 1 件 ·
-
Pick your own Actionオープン
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
OpenSourceFellows/amplify#1058 · コメント 1 件 ·
OpenSourceFellows/amplify の issue をすべて見る
似ている issue
-
bug documentation
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
awslabs/visual-asset-management-system#880 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
メンテナーはふだん 1 日以内に返信
-
possible bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Mintplex-Labs/anything-llm#6889 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
swc-project/swc-next#1165 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nhsuk/nhsuk-prototype-kit-package#439 ·
メンテナーはふだん 1 日以内に返信