-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 83c4fee
Showing
18 changed files
with
8,728 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ['@ionos-deploy-now/eslint-config-actions'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version of release' | ||
type: string | ||
required: true | ||
update-major-tag: | ||
description: 'Update major release tag to current release' | ||
type: boolean | ||
required: true | ||
default: false | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: Setup project | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
npm ci | ||
- name: Test and build code | ||
run: | | ||
npm run lint | ||
npm run test | ||
npm run build | ||
- name: Build release | ||
run: | | ||
npm version ${{ inputs.version }} --no-commit-hooks --no-git-tag-version | ||
npm run release | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
id: commit-step | ||
with: | ||
commit_message: Release version v${{ inputs.version }} | ||
tagging_message: v${{ inputs.version }} | ||
- if: inputs.update-major-tag | ||
name: Update major version tag | ||
uses: actions/github-script@v3 | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
SHA: ${{ steps.commit-step.outputs.commit_hash }} | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
const { VERSION, SHA } = process.env | ||
const tag = "v" + VERSION.split(".")[0] | ||
if (tag === "v") { | ||
return | ||
} | ||
try { | ||
await github.git.deleteRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "tags/" + tag | ||
}) | ||
} catch (e) { | ||
console.log("The tag " + tag + " doesn't exist yet.") | ||
} | ||
await github.git.createRef({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
ref: "refs/tags/" + tag, | ||
sha: SHA | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Test and build action | ||
|
||
on: push | ||
|
||
jobs: | ||
test-and-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
registry-url: 'https://npm.pkg.github.com' | ||
- name: Setup project | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
npm ci | ||
- name: Test and build code | ||
run: | | ||
npm run lint | ||
npm run test | ||
npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.iml | ||
.idea | ||
|
||
node_modules | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Retrieve meta information of an IONOS Deploy Now project. | ||
|
||
Do not use this action on your own. [IONOS Deploy Now](https://ionos.space) will setup this for you. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'IONOS Deploy Now - Project Action' | ||
description: 'Interact with IONOS Deploy Now to perform different actions on a project' | ||
inputs: | ||
service-host: | ||
description: 'The service endpoint to call in the action' | ||
required: true | ||
api-key: | ||
description: 'The api key to access IONOS Deploy Now' | ||
required: true | ||
project-id: | ||
description: 'The identifier of the IONOS Deploy Now project' | ||
required: true | ||
branch-id: | ||
description: 'The identifier of a branch' | ||
required: false | ||
deployment-id: | ||
description: 'The identifier of a deployment' | ||
required: false | ||
status: | ||
description: 'The status to set for a deployment' | ||
required: false | ||
action: | ||
description: 'The action to perform' | ||
required: true | ||
outputs: | ||
info: | ||
description: 'A json object containing the requested info' | ||
runs: | ||
using: 'node16' | ||
main: 'dist/index.js' |
Oops, something went wrong.