File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -99,14 +99,27 @@ jobs:
99
99
with :
100
100
name : build-distribution
101
101
path : ./build
102
+ - id : setup-docker
103
+ name : Set up docker variables
104
+ run : |-
105
+ # version without v prefix (e.g. 1.2.3)
106
+ echo "tag=${GITHUB_REF_NAME/v/}" >> "${GITHUB_OUTPUT}"
107
+ echo "name=docker.elastic.co/observability/apm-agent-python" >> "${GITHUB_OUTPUT}"
102
108
- name : Docker build
103
109
run : >-
104
110
docker build
105
- -t docker.elastic.co/observability/apm-agent-python :${GITHUB_REF_NAME/v/ }
111
+ -t ${{ steps.setup- docker.outputs.name }} :${{ steps.setup-docker.outputs.tag } }
106
112
--build-arg AGENT_DIR=./build/dist/package/python
107
113
.
114
+ - name : Docker retag
115
+ run : >-
116
+ docker tag
117
+ ${{ steps.setup-docker.outputs.name }}:${{ steps.setup-docker.outputs.tag }}
118
+ ${{ steps.setup-docker.outputs.name }}:latest
108
119
- name : Docker push
109
- run : docker push docker.elastic.co/observability/apm-agent-python:${GITHUB_REF_NAME/v/}
120
+ run : |-
121
+ docker push ${{ steps.setup-docker.outputs.name }}:${{ steps.setup-docker.outputs.tag }}
122
+ docker push ${{ steps.setup-docker.outputs.name }}:latest
110
123
111
124
github-draft :
112
125
permissions :
You can’t perform that action at this time.
0 commit comments