Are You Awake Yet Action
@dataeducator đang làm issue này rồi.
Từ ngày 8/11/2023.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- JavaScript
- Star
- 120
- Fork
- 101
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của OpenSourceFellows/amplify
-
QA Bug Part 2 Update Axios-cache-InterceptionCó thể làm lại được @SAUMILDHANKAR đã nhận 355 ngày trước và không có pull request nào đang mở. Đang mởbug Failing workflow check
OpenSourceFellows/amplify#1077 · 4 bình luận · 2 người được giao ·
-
Auto messages for Pull RequestCó thể làm lại được @Alex-is-Gonzalez đã nhận 355 ngày trước và không có pull request nào đang mở. Đang mở
OpenSourceFellows/amplify#1076 · 2 bình luận · 1 người được giao ·
-
Add Auto Reviewer to PRĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
OpenSourceFellows/amplify#1075 ·
-
new contributor
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
OpenSourceFellows/amplify#1059 · 1 bình luận ·
-
Pick your own ActionĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
OpenSourceFellows/amplify#1058 · 1 bình luận ·
Tất cả issue của OpenSourceFellows/amplify
Issue tương tự
-
Add google analyticsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
NCAR/music-box-interactive#628 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
remotion-dev/remotion#11847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
phoenixframework/phoenix_live_view#4456 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
AllTheMods/ATM-10#4436 ·
Maintainer thường phản hồi trong vòng 5 ngày