22
22
docker_image_prefix :
23
23
required : true
24
24
type : string
25
+ ref :
26
+ required : false
27
+ type : string
28
+ default : ${{ github.ref }}
25
29
26
30
env :
27
31
golang-version : 1.18.1
39
43
uses : actions/checkout@v3
40
44
with :
41
45
repository : timescale/promscale
46
+ ref : ${{ inputs.ref }}
42
47
43
48
- name : Login to GitHub Container Registry
44
49
uses : docker/login-action@v2
@@ -50,22 +55,22 @@ jobs:
50
55
- name : Figure out database container image from branch name
51
56
id : metadata
52
57
run : |
53
- if [[ "${{ github.event_name }}" =~ 'workflow_dispatch' ]]; then \
54
- docker_image_12=$(echo ${{github.event.inputs.docker_image_prefix}}-pg12) \
55
- docker_image_13=$(echo ${{github.event.inputs.docker_image_prefix}}-pg13) \
56
- docker_image_14=$(echo ${{github.event.inputs.docker_image_prefix}}-pg14) \
57
- elif [[ "${{ github.event_name }}" =~ 'workflow_call' ]]; then \
58
- docker_image_12=$(echo ${{inputs.docker_image_prefix}}-pg12) \
59
- docker_image_13=$(echo ${{inputs.docker_image_prefix}}-pg13) \
60
- docker_image_14=$(echo ${{inputs.docker_image_prefix}}-pg14) \
61
- else \
62
- branch_name=$(echo ${{github.head_ref || github.ref_name}} | sed 's#/#-#') \
63
- possible_branch_tag=$(echo ${branch_name}-ts2) \
64
- master_branch_tag=$(echo master-ts2) \
65
- image_base="ghcr.io/timescale/dev_promscale_extension" \
66
- docker_image_12=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg12 ${image_base}:${master_branch_tag}-pg12) \
67
- docker_image_13=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg13 ${image_base}:${master_branch_tag}-pg13) \
68
- docker_image_14=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg14 ${image_base}:${master_branch_tag}-pg14) \
58
+ if [[ "${{ github.event_name }}" =~ 'workflow_dispatch' ]]; then
59
+ docker_image_12=$(echo ${{github.event.inputs.docker_image_prefix}}-pg12)
60
+ docker_image_13=$(echo ${{github.event.inputs.docker_image_prefix}}-pg13)
61
+ docker_image_14=$(echo ${{github.event.inputs.docker_image_prefix}}-pg14)
62
+ elif [[ "${{ github.event_name }}" =~ 'workflow_call' ]]; then
63
+ docker_image_12=$(echo ${{inputs.docker_image_prefix}}-pg12)
64
+ docker_image_13=$(echo ${{inputs.docker_image_prefix}}-pg13)
65
+ docker_image_14=$(echo ${{inputs.docker_image_prefix}}-pg14)
66
+ else
67
+ branch_name=$(echo ${{github.head_ref || github.ref_name}} | sed 's#/#-#')
68
+ possible_branch_tag=$(echo ${branch_name}-ts2)
69
+ master_branch_tag=$(echo master-ts2)
70
+ image_base="ghcr.io/timescale/dev_promscale_extension"
71
+ docker_image_12=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg12 ${image_base}:${master_branch_tag}-pg12)
72
+ docker_image_13=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg13 ${image_base}:${master_branch_tag}-pg13)
73
+ docker_image_14=$(./scripts/fallback-docker.sh ${image_base}:${possible_branch_tag}-pg14 ${image_base}:${master_branch_tag}-pg14)
69
74
fi;
70
75
echo "::set-output name=docker_image_12::${docker_image_12}"
71
76
echo "::set-output name=docker_image_13::${docker_image_13}"
89
94
uses : actions/checkout@v3
90
95
with :
91
96
repository : timescale/promscale
97
+ ref : ${{ inputs.ref }}
92
98
93
99
- name : Checkout test data files
94
100
run : wget https://github.com/timescale/promscale-test-data/raw/main/traces-dataset.sz -O pkg/tests/testdata/traces-dataset.sz
@@ -129,6 +135,9 @@ jobs:
129
135
steps :
130
136
- name : Check out code into the Go module directory
131
137
uses : actions/checkout@v3
138
+ with :
139
+ repository : timescale/promscale
140
+ ref : ${{ inputs.ref }}
132
141
133
142
- name : Set up Go ${{ env.golang-version }}
134
143
0 commit comments