mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
ci(release): trigger container build and portainer webhook for specific projects and branches
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
[
|
||||
"@codedependant/semantic-release-docker",
|
||||
{
|
||||
"dockerImage": "revanced-bot-websocket-api",
|
||||
"dockerRegistry": "ghcr.io",
|
||||
"dockerProject": "revanced",
|
||||
"dockerContext": "../..",
|
||||
"dockerPlatform": [
|
||||
"linux/amd64",
|
||||
"linux/arm64"
|
||||
],
|
||||
"dockerArgs": {
|
||||
"GITHUB_ACTOR": null,
|
||||
"GITHUB_TOKEN": null
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
31
apis/websocket/.releaserc.js
Normal file
31
apis/websocket/.releaserc.js
Normal file
@@ -0,0 +1,31 @@
|
||||
import { $ } from 'execa'
|
||||
|
||||
const branch = (await $`git rev-parse --abbrev-ref HEAD`).stdout.trim()
|
||||
|
||||
export default {
|
||||
plugins:
|
||||
branch === 'main'
|
||||
? [
|
||||
[
|
||||
'@codedependant/semantic-release-docker',
|
||||
{
|
||||
dockerImage: 'revanced-bot-websocket-api',
|
||||
dockerRegistry: 'ghcr.io',
|
||||
dockerProject: 'revanced',
|
||||
dockerContext: '../..',
|
||||
dockerPlatform: ['linux/amd64', 'linux/arm64'],
|
||||
dockerArgs: {
|
||||
GITHUB_ACTOR: null,
|
||||
GITHUB_TOKEN: null,
|
||||
},
|
||||
},
|
||||
],
|
||||
[
|
||||
'@semantic-release/exec',
|
||||
{
|
||||
publishCmd: 'bun run scripts/trigger-portainer-webhook.ts',
|
||||
},
|
||||
],
|
||||
]
|
||||
: [],
|
||||
}
|
||||
4
apis/websocket/scripts/trigger-portainer-webhook.ts
Normal file
4
apis/websocket/scripts/trigger-portainer-webhook.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import { $ } from 'bun'
|
||||
|
||||
const URLEnvironmentVariableName = 'WEBSOCKET_API_PORTAINER_WEBHOOK_URL'
|
||||
await $`INPUT_WEBHOOK_URL=${process.env[URLEnvironmentVariableName]} bun run ../../node_modules/portainer-service-webhook/dist`
|
||||
Reference in New Issue
Block a user