-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (33 loc) · 1.19 KB
/
test-action.yml
File metadata and controls
40 lines (33 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Test Action
on: [push]
jobs:
test-action:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create test file
run: |
mkdir -p test-files
echo "Test file created at $(date)" > test-files/test-upload.txt
echo "GitHub SHA: ${{ github.sha }}" >> test-files/test-upload.txt
echo "Workflow run: ${{ github.run_number }}" >> test-files/test-upload.txt
cat test-files/test-upload.txt
- name: Test Upload to Vercel Blob
id: upload
uses: ./
with:
source: "test-files/test-upload.txt"
destination: "github-actions-test/test-${{ github.run_number }}-${{ github.sha }}.txt"
read-write-token: ${{ secrets.BLOB_READ_WRITE_TOKEN }}
- name: Verify upload result
run: |
echo "✅ File uploaded successfully!"
echo "📁 Blob URL: ${{ steps.upload.outputs.url }}"
# Verify the URL is valid
if [[ "${{ steps.upload.outputs.url }}" =~ ^https:// ]]; then
echo "✅ URL format is valid"
else
echo "❌ URL format is invalid"
exit 1
fi