You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[](https://codespaces.new/JustinGrote/PowerShellGithubActions?quickstart=1)
4
-
5
3
This is a demo of how to develop custom GitHub Actinos in PowerShell. This repository is the companion to the PSConfEU 2024 Presentation **Building Custom GitHub Actions in PowerShell**
6
4
7
5
## Follow Along Setup
@@ -10,12 +8,17 @@ If you run into any problems with this setup feel free to reach out to @JustinWG
10
8
11
9
[GitHub Codespaces](https://github.com/features/codespaces) provides a complete preconfigured development environment that runs in GitHub. GitHub provides all users 60 hours a month of free usage. You do not even need Visual Studio Code **installed** locally, it can run within your browser.
12
10
13
-
### Steps
11
+
### Common Setup
14
12
15
13
1.[Sign up for a GitHub account](https://github.com/join) if you do not already have one. It is free to join.
16
-
1. Open our codespaces quickstart link in the browser of your choice (Edge/Chrome recommended)
17
-
[](https://codespaces.new/JustinGrote/PowerShellGithubActions?quickstart=1)
18
-
1. Click `Create new codespace` when prompted. You can optionally click `Change Options` and customize some aspects of the codespace such as the number of CPUs. This repo is preconfigured with 4 cores. While 2 core is totally sufficient for Github Action editing, we are using 4 for this demo to reduce startup and build time and generally avoid lag due to time constraints.
14
+
1.[Fork the Repository](https://github.com/JustinGrote/PowerShellGithubActions/fork), this will create a copy of the repository in your account, and give you a way to pull future changes.
15
+
1. Enable Github Actions in your new repository by going to the `Actions` tab and accept to enable them. You don't have to trust me, feel free to review the GitHub Actions before you do, but the initial examples are all manually triggered.
16
+

17
+
18
+
### Option 1: Online/Codespaces (recommended)
19
+
20
+
1. The first part of the process will just use the embedded Actions editor, which is pretty good. The second part we will go into some vscode tooling.
21
+
1. Go to your forked repo and click `Create Codespace on Main`
19
22
1. If you have Visual Studio Code installed, it will prompt you to open a link in Visual Studio code to connect to your codespace, otherwise the web version of Visual Studio Code will open in your browser and connect to the codespace.
20
23
1. The codespace may take several minutes to load.
21
24
1.**Congratulations!** You are now ready to start your GitHub Action development journey.
@@ -25,14 +28,10 @@ If you run into any problems with this setup feel free to reach out to @JustinWG
25
28
This is an option if you wish to work "offline". It does not require a GitHub account, though we still recommend a GitHub Account as you will not be able to make pull requests to test the lab exercises or run GitHub Actions without one.
26
29
27
30
1. Follow the [Dev Containers Tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to setup devcontainers on your local computer.
28
-
1. Clone the Github Repository (https://codespaces.new/JustinGrote/PowerShellGithubActions) to a local folder and then open it in Visual Studio Code
31
+
1. Clone your fork to a local folder and then open it in Visual Studio Code.
29
32
1. You should be prompted to reopen the project in a devcontainer.
30
-
1. Once the codespace loads, you will likely see a warning about the C# prerelease being required. Go ahead and click Upgrade to reload the codespace. This is due to the new C# Dev Kit extension and this message will stop occuring once it becomes generally available.
31
-

32
-
1.**Congratulations!** You are now ready to start your Github Action- development journey.
33
+
1.**Congratulations!** You are now ready to start your Github Action development journey.
33
34
34
35
### Option 3: Local Development
35
36
36
-
If you prefer local development, or are in a controlled environment without access to Docker or Codespaces, you can simply clone this GitHub repository and work locally. You will need to manually install PowerShell, .NET Core, and all the relevant extensions. **This is not recommended**
37
-
38
-
## Customizati
37
+
If you prefer local development, you can simply clone this GitHub repository and work locally. It is recommended you install the [GitHub Actions VSCode Extension](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-github-actions).
0 commit comments