This commit is contained in:
parent
eda52ab138
commit
abdb555e1a
2 changed files with 724 additions and 608 deletions
18
pull/action.yml
Normal file
18
pull/action.yml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# SPDX-License-Identifier: EUPL-1.2
|
||||
name: "Artifact Pull"
|
||||
description: "Download and extract a workflow artifact"
|
||||
author: "Louis Seubert"
|
||||
inputs:
|
||||
name:
|
||||
description: >
|
||||
The name of the artifact to download.
|
||||
required: true
|
||||
path:
|
||||
description: >
|
||||
The directory to extract the artifact into.
|
||||
required: false
|
||||
default: "."
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "../Dockerfile"
|
||||
args: ["pull"]
|
||||
32
pull/main.go
32
pull/main.go
|
|
@ -1,32 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"code.geekeey.de/actions/sdk"
|
||||
)
|
||||
|
||||
func main() {
|
||||
action := &pullArtifactAction{Action: sdk.New()}
|
||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
||||
defer cancel()
|
||||
if err := action.Run(ctx); err != nil {
|
||||
action.Errorf("%s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
type pullArtifactAction struct {
|
||||
*sdk.Action
|
||||
name string
|
||||
}
|
||||
|
||||
func (action *pullArtifactAction) setup() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (action *pullArtifactAction) Run(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
Loading…
Reference in a new issue