Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .vscode/github-actions.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"scope": "yaml"
},
"GitHub Actions - Composite Action 'run' Step": {
"prefix": "gha-composite-action-run-step",
"prefix": "gha-composite-action-step-run",
"body": [
" - name: ${1:Run Command}",
" id: ${2:step_id}",
Expand All @@ -89,7 +89,7 @@
"scope": "yaml"
},
"GitHub Actions - Composite Action 'uses' Step": {
"prefix": "gha-composite-action-uses-step",
"prefix": "gha-composite-action-step-uses",
"body": [
" - name: ${1:Use Existing Action}",
" id: ${2:step_id}",
Expand Down Expand Up @@ -127,7 +127,7 @@
"scope": "yaml"
},
"GitHub Actions - Node Action": {
"prefix": "gha-node20-action",
"prefix": "gha-node-action",
"body": [
"name: ${1:Node.js GitHub Action}",
"author: ${2:Your Name}",
Expand Down Expand Up @@ -200,7 +200,7 @@
"scope": "yaml"
},
"GitHub Actions - Workflow Job 'run' Step": {
"prefix": "gha-workflow-job-run-step",
"prefix": "gha-workflow-job-step-run",
"body": [
" - name: ${1:Run Command}",
" id: ${2:step_id}",
Expand All @@ -213,7 +213,7 @@
"scope": "yaml"
},
"GitHub Actions - Workflow Job 'uses' Step": {
"prefix": "gha-workflow-job-uses-step",
"prefix": "gha-workflow-job-step-uses",
"body": [
" - name: ${1:Use Existing Action}",
" id: ${2:step_id}",
Expand Down
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ This repository provides a collection of **Visual Studio Code snippets** for **G

### 4️⃣ GitHub Actions - Composite Action 'run' Step

- **Prefix:** `gha-composite-action-run-step`
- **Prefix:** `gha-composite-action-step-run`
- **Description:** Inserts a 'run' step for Composite Actions with optional **`if`, `env`, `shell`, and `working-directory`** properties.

### 5️⃣ GitHub Actions - Composite Action 'uses' Step

- **Prefix:** `gha-composite-action-uses-step`
- **Prefix:** `gha-composite-action-step-uses`
- **Description:** Inserts a 'uses' step for referencing other actions.

### 6️⃣ GitHub Actions - Docker Action
Expand All @@ -60,7 +60,7 @@ This repository provides a collection of **Visual Studio Code snippets** for **G

### 7️⃣ GitHub Actions - Node.js Action

- **Prefix:** `gha-node20-action`
- **Prefix:** `gha-node-action`
- **Description:** Provides a template for creating a **Node.js 20.x GitHub Action**.

### 8️⃣ GitHub Actions - Workflow Boilerplate
Expand All @@ -71,9 +71,19 @@ This repository provides a collection of **Visual Studio Code snippets** for **G

### 9️⃣ GitHub Actions - Workflow Job

- **Prefix:** `gha-job`
- **Prefix:** `gha-workflow-job`
- **Description:** Inserts a job structure with `runs-on` options and a **job status reference**.

### 4️⃣ GitHub Actions - Workflow Job 'run' Step

- **Prefix:** `gha-workflow-job-step-run`
- **Description:** Inserts a 'run' step for Composite Actions with optional **`if`, `env`, `shell`, and `working-directory`** properties.

### 5️⃣ GitHub Actions - Workflow Job 'uses' Step

- **Prefix:** `gha-workflow-job-step-uses`
- **Description:** Inserts a 'uses' step for referencing other actions.

## 🛠 How to Use

1. Open a `.yml` file inside the `.github/workflows/` directory.
Expand All @@ -86,7 +96,7 @@ This repository provides a collection of **Visual Studio Code snippets** for **G
**Using the `gha-workflow` snippet:**

```yaml
name: Example Workflow
name: GitHub Workflow

on:
- push
Expand All @@ -97,18 +107,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
id: checkout-repository
uses: actions/checkout@v4

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: '20'

- name: Install Dependencies
id: install-dependencies
run: npm install

- name: Run Tests
id: run-tests
run: npm test

```

## 🔍 Contributing
Expand Down