feat: some basic action core logic

This commit is contained in:
Louis Seubert 2026-07-11 20:44:43 +02:00
commit c16a870d2b
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
6 changed files with 64 additions and 0 deletions

3
eng/Containerfile Normal file
View file

@ -0,0 +1,3 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0
WORKDIR /work
COPY ./src /work

View file

@ -0,0 +1,37 @@
@{
RootModule = 'Geekeey.Build.Pwsh.psm1'
ModuleVersion = '1.0.0'
GUID = '234baa68-d26f-4bf9-996d-45ec3520cb95'
Author = 'The Geekeey Authors'
CompanyName = 'Geekeey'
Copyright = '(c) The Geekeey Authors. Licensed under EUPL-1.2.'
Description = 'Forgejo Actions helper functions for PowerShell.'
FunctionsToExport = @(
'Set-ActionOutput',
'Set-ActionEnv',
'Add-ActionPath',
'Add-ActionMask',
'Add-ActionMatcher',
'Remove-ActionMatcher',
'Save-ActionState',
'Add-ActionStepSummary',
'Get-ActionInput',
'Write-ActionDebug',
'Write-ActionNotice',
'Write-ActionWarning',
'Write-ActionError',
'Stop-Action',
'Invoke-ForgejoApi',
'Get-ForgejoContext'
)
CmdletsToExport = @()
VariablesToExport = @()
AliasesToExport = @()
PowerShellVersion = '7.0'
PrivateData = @{
PSData = @{
LicenseUri = 'https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12'
Tags = @('Forgejo', 'Actions', 'CI')
}
}
}

View file

@ -0,0 +1 @@
using module ../Geekeey.Build.Pwsh.psd1

22
src/collection/pwsh.ps1 Normal file
View file

@ -0,0 +1,22 @@
# Copyright (c) The Geekeey Authors
# SPDX-License-Identifier: EUPL-1.2
using module ../Geekeey.Build.Pwsh.psd1
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'Ignore'
$PSNativeCommandUseErrorActionPreference = $true
$script = Get-ActionInput -Name "script" -Required
try
{
Invoke-Expression $script
}
catch
{
Write-ActionError "Script failed: $_"
exit 1
}

View file

@ -0,0 +1 @@
using module ../Geekeey.Build.Pwsh.psm1

0
src/core/context.ps1 Normal file
View file