Skip to content

Commit 515d53a

Browse files
committed
Setup an 'infra' workspace and an 'infra/example' action
This simply demonstrates how we can generate many actions from a single npm package. Implementation of actual actions will follow.
1 parent 36314ff commit 515d53a

File tree

21 files changed

+9146
-4
lines changed

21 files changed

+9146
-4
lines changed

.eslintrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"plugins": ["@typescript-eslint", "prettier"],
5+
"extends": [
6+
"eslint:recommended",
7+
"plugin:@typescript-eslint/eslint-recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
]
10+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/dist/** linguist-generated=true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: test-actions
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
jobs:
8+
test-infra-example:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: ./infra/example
13+
id: custom-action
14+
with:
15+
in: my-input
16+
- run: echo "Success!"
17+
shell: bash
18+
if: steps.custom-action.outputs.out == 'example-output'
19+
- run: echo "Failure" && exit 1
20+
shell: bash
21+
if: steps.custom-action.outputs.out != 'example-output'

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": true,
3+
"printWidth": 88
4+
}

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
11
# actions
22

3-
Set of GitHub Actions actions used a cross the Scality organization.
3+
Set of GitHub Actions actions used across the Scality organization.
44

55
## action-crons
66
Call different workflows running on defined hour with specific arguments.
77

88
## actions-docker-upload
99
Bunch of step to upload an image speed up with `actions@cache`.
10+
11+
---
12+
13+
Some custom Javascript actions are built from this repository, using Typescript.
14+
15+
## `infra` actions
16+
17+
A collection of actions to provision cloud infrastructure for installing and
18+
testing Scality products.
19+
20+
### `scality/actions/infra/example`
21+
22+
**(temporary)** _An example action demonstrating how these actions will be built,
23+
tested, and used._
24+
25+
Inputs:
26+
27+
- `in`: an input string which will be logged
28+
29+
Outputs:
30+
31+
- `out`: fixed string (value `"example-output"`)

infra/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/

infra/example/action.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'example'
2+
description: An example action
3+
4+
inputs:
5+
in:
6+
description: An arbitrary input string
7+
type: string
8+
required: true
9+
10+
outputs:
11+
out:
12+
description: A fixed output
13+
type: string
14+
15+
runs:
16+
using: 'node16'
17+
main: './dist/index.js'

0 commit comments

Comments
 (0)