Skip to content

Commit

Permalink
test run
Browse files Browse the repository at this point in the history
  • Loading branch information
root27 committed Mar 29, 2024
1 parent 78d9c63 commit 2a53b1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Deploy to server
- name: Test Action
env:
SERVER_KEY: ${{ secrets.SERVER_KEY }}
run: echo hello
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,18 @@ func main() {
workflow.Jobs.Deploy.Steps = []Step{
{
Uses: "actions/checkout@v2",
Name: "Deploy to server",
},
{
Name: "Test Action",
},
}

if secretName != "" {
workflow.Jobs.Deploy.Steps[0].Env = Env{
workflow.Jobs.Deploy.Steps[1].Env = Env{
secretName: "${{ secrets." + secretName + " }}",
}

workflow.Jobs.Deploy.Steps[1].Run = "echo hello"
}

fmt.Printf("Workflow steps: %v\n", workflow.Jobs.Deploy.Steps)
Expand Down

0 comments on commit 2a53b1b

Please sign in to comment.