Magic input

This commit is contained in:
Andreas Svanberg 2024-10-16 12:56:20 +02:00
parent 4df3a6a9fc
commit 3ada329e32
3 changed files with 7 additions and 2 deletions

@ -1,5 +1,10 @@
name: 'Deploy to branch.dsv.su.se'
description: 'Deploy the current branch via Docker Compose to branch.dsv.su.se'
inputs:
gitea-token:
description: 'The Gitea token to use for authentication'
default: ${{ github.token }}
required: false
outputs:
url:
description: 'The URL of the deployed branch'

2
dist/index.js vendored

@ -59,7 +59,7 @@ function main() {
const api = client.default({
baseUrl: gitea.context.apiUrl,
headers: {
["Authorization"]: `token ${process.env.ACTIONS_RUNTIME_TOKEN}`
["Authorization"]: `token ${core.getInput('gitea-token', { required: true })}`
}
});
const { data, error } = yield api.GET('/repos/{owner}/{repo}', {

@ -24,7 +24,7 @@ async function main() {
const api = client.default<specification.paths>({
baseUrl: gitea.context.apiUrl,
headers: {
["Authorization"]: `token ${process.env.ACTIONS_RUNTIME_TOKEN}`
["Authorization"]: `token ${core.getInput('gitea-token', {required: true})}`
}
});
const {data, error} = await api.GET('/repos/{owner}/{repo}', {