lgoad-upload-action/.github/workflows/test.yaml
Kodi Craft be8432c7dd
All checks were successful
/ Upload and download test (push) Successful in 24s
Tweaks and error handling
2024-06-15 11:57:26 +02:00

32 lines
916 B
YAML

on:
push:
branches:
- main
workflow_dispatch:
jobs:
test-action:
runs-on: nix
name: Upload and download test
steps:
- name: Create sample file
run: echo "Hello, world!" > test.txt
- name: Upload to lgoad
id: upload
uses: https://git.colon-three.com/kodi/lgoad-upload-action@main
with:
file: test.txt
token: ${{ secrets.LGOAD_TOKEN }}
custom-machine-name: 'github-action-test-machine'
content-type: 'text/plain'
custom-name: 'test.txt'
use-salt: 'true'
- name: Print the URL
run: echo "The URL is ${{ steps.upload.outputs.url }}"
- name: Check that the file is correctly uploaded
run: |
curl -s -o test-uploaded.txt ${{ steps.upload.outputs.url }}
nix shell "nixpkgs#diffutils" -c diff test.txt test-uploaded.txt
rm test.txt