-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.31 KB
/
test-get.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
name: test-get
on:
push: {}
workflow_dispatch:
inputs:
environment:
type: environment
default: production
jobs:
upload:
environment: ${{ inputs.environment || 'production' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo -n "SUCCESSFUL" > .final_status
- name: Artifacts Upload
id: artifacts-upload
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
source: .final_status
method: upload
- name: Download file to update artifacts cache
run: |
curl -H 'ForceCacheUpdate: yes' \
-u ${{ secrets.ARTIFACTS_USER }}:${{ secrets.ARTIFACTS_PASSWORD }} \
--silent --fail --show-error \
--max-time 3600 \
${{ vars.ARTIFACTS_URL }}/download/${{ steps.artifacts-upload.outputs.name }}/.final_status
test-get-container:
needs:
- upload
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
container:
image: 'ubuntu:20.04'
steps:
- uses: actions/checkout@v3
- name: update
run: apt-get update
- run: apt-get install -y curl
- name: Get Artifacts
id: artifacts-get
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
workflow-name: test-get
method: get
- name: Print the artifacts name
run: |
echo ${{ steps.artifacts-get.outputs.name }}
echo ${{ steps.artifacts-get.outputs.link }}
test-get:
needs:
- upload
runs-on: ubuntu-latest
environment: ${{ inputs.environment || 'production' }}
steps:
- uses: actions/checkout@v3
- name: Get Artifacts
id: artifacts-get
uses: ./
with:
url: ${{ vars.ARTIFACTS_URL }}
user: ${{ secrets.ARTIFACTS_USER }}
password: ${{ secrets.ARTIFACTS_PASSWORD }}
workflow-name: test-get
method: get
- name: Print the artifacts name
run: |
echo ${{ steps.artifacts-get.outputs.name }}
echo ${{ steps.artifacts-get.outputs.link }}