Skip to content

Commit

Permalink
Working commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kvanbere committed Oct 7, 2023
1 parent fa7b52b commit 66350be
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false # needed for <br/>-like breaks
14 changes: 14 additions & 0 deletions .github/workflows/test-windows-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on: [push]
name: test-windows-latest
jobs:
test-action:
name: Test
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
- uses: /
with:
uri: https://google.com/
filename: google.html
retries: 3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.DS_Store
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kyle Van Berendonck <kyle.vanberendonck@cuedo.com.au>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2023 Cuedo Controls
Copyright (c) 2023 CUEDO CONTROLS PTY LTD

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
29 changes: 29 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: 'Invoke URI'
description: 'Call a URI and return the result'
author: foss@cuedo.com.au
branding:
icon: 'link-2'
color: 'orange'
inputs:
uri:
required: true
description: "Invoke the specified URI"
filename:
description: "Save the output to the specified file"
retries:
description: "Retry the request if it fails"
default: 3
runs:
using: "composite"
steps:
- name: Invoke URI (Linux)
run: export DISPLAY="127.0.0.1:10.0"
if: runner.os == 'Linux'
- name: Invoke URI (Windows)
env:
URI: ${{ format('-Uri {0}', inputs.uri) }}
FILENAME: ${{ inputs.filename > 0 && format(' -OutFile "{0}"') || '' }}
RETRIES: ${{ inputs.retries > 0 && format(' -MaximumRetryCount {0}', inputs.retries) || '' }}
run: |
Invoke-WebRequest ${{env.URI}}${{env.FILENAME}}${{env.RETRIES}}
if: runner.os == 'Windows'

0 comments on commit 66350be

Please sign in to comment.