From 1414306012860b676efe9c179335ff418521ae9d Mon Sep 17 00:00:00 2001 From: Kodi Craft Date: Sat, 15 Jun 2024 11:47:19 +0200 Subject: [PATCH] Add workflow to test action automatically --- .github/workflows/test.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..c1b5ec7 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,30 @@ +on: + push: + branches: + - main + +jobs: + test-action: + runs-on: nix + name: Tests that the action works as expected + 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 }} + diff test.txt test-uploaded.txt + rm test.txt +