🤖

「GitHub Skills」でGtiHub Actionsに入門した。

2023/04/09に公開

GitHub Skillsは初心者から上級者までを対象にしたGitHubの入門コースです。
https://skills.github.com/

Hands-onで実際にGitHubを操作しながら、楽しんで学ぶことができて非常に有益でした。
GitHub Skillsが提供するいくつかのリポジトリをtemplateにして、自分のアカウントに学習用のリポジトリを作成し、そのリポジトリ上で学習を進めていきます。

GitHub1日目、1週間目…などなど16個のコースが有りました。

GitHub Skillsのリポジトリ数を見ても19個もあり、色々と楽しめそうです。

GitHubの紹介やGitHubPagesの使い方、プルリクエストのレビューの仕方やマージの衝突の解決方法まで(!)学ぶことができます。
また、自分は今のところ「Hello GitHub Actions」と「secure-code-game」しかやっていないのですが、GitHub上の操作だけで完結したり、コーディングが必要なものでもGitHub CodeSpacesだけで実験できるなど、環境構築に手間取ることがなかったのもおすすめポイントです!

Hello GitHub Actions

https://github.com/skills/hello-github-actions

今回自分がやってみたのはGitHubActionsの入門コースです。
5つのStepに分かれていて、各Stepごとに課題をこなしていく形式です。

Step 1: Create a workflow file
Step 2: Add a job to your workflow file
Step 3: Add actions to your workflow file
Step 4: Merge your workflow file
Step 5: Trigger the workflow

試しにStep 1の内容を示すとこんな感じです。

1.Open a new browser tab, and navigate to this same repository. Then, work on the steps in your second tab while you read the instructions in this tab.
2.Create a pull request to view all the changes you'll make throughout this course. Click the Pull Requests tab, click New pull request, set base: main and compare:welcome-workflow, click Create pull request.
3. Navigate to the Code tab.
4.From the main branch dropdown, click on the welcome-workflow branch.
5.Navigate to the .github/workflows/ folder, then select Add file and click on Create new file.
6.In the Name your file... field, enter welcome.yml.
7.Add the following content to the welcome.yml file:

name: Post welcome comment
on:
  pull_request:
    types: [opened]
permissions:
  pull-requests: write

8.To commit your changes, click Commit new file.
9. Wait about 20 seconds for actions to run, then refresh this page (the one you're following instructions from) and an action will automatically close this step and open the next one.

各ステップごとに、手順を詳細に説明してくれるので、ほぼ迷わずに実践できます。前編英語ですが、DeepLを駆使して読み切りましょう!

感想

無料で、サクッと試せて、環境構築にも戸惑わない。Hand-onで学べるなどいいとこづくしでした。開発で気分展開したいときなどに、ちょこちょこ勧めていきたいと思います!

Discussion