Skip to content

Commit

Permalink
feat: add action (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcScheib committed Aug 31, 2024
1 parent 98ebe15 commit 0d6d3b5
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ env.author-name }}
GIT_AUTHOR_EMAIL: ${{ env.author-email }}
run: npx semantic-release
run: npx --yes -p @semantic-release/changelog -p @semantic-release/git semantic-release
9 changes: 9 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: 'Hetzner Cloud API Action'
description: 'Interact with the Hetzner Cloud API from a GitHub '
inputs:

outputs:

runs:
using: 'node20'
main: 'dist/index.js'
105 changes: 105 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "hetzner-cloud-api-action",
"version": "1.0.0",
"description": "A GitHub action to interact with the Hetzner Cloud API",
"type": "module",
"main": "src/index.js",
"scripts": {
"start": "node ./src/index.js",
"package": "ncc build src/index.js --license licenses.txt"
},
"repository": {
"type": "git",
"url": "git+https://github.com/CycriLabs/hetzner-cloud-api-action.git"
},
"keywords": [],
"author": "Marc Scheib",
"license": "MIT",
"bugs": {
"url": "https://github.com/CycriLabs/hetzner-cloud-api-action/issues"
},
"homepage": "https://github.com/CycriLabs/hetzner-cloud-api-action#readme",
"dependencies": {
"@actions/core": "^1.10.1"
},
"devDependencies": {
"@vercel/ncc": "^0.38.1",
"prettier": "^3.0.3"
}
}
12 changes: 12 additions & 0 deletions src/hetzner-cloud.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import core from '@actions/core';

/**
* Action for Hetzner cloud interaction.
*/
export async function run() {
try {
core.info('Running the action');
} catch (error) {
core.setFailed(error.message);
}
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { run } from './hetzner-cloud.js';

await run();

0 comments on commit 0d6d3b5

Please sign in to comment.