File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed
Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Push Entropy Tester Image
2+ on :
3+ push :
4+ tags :
5+ - entropy-tester-v*
6+ pull_request :
7+ paths :
8+ - " apps/entropy-tester/**"
9+ - " .workspaces/entropy-tester/docker-entropy-tester.yml"
10+ - " Dockerfile.node"
11+ workflow_dispatch :
12+ inputs :
13+ dispatch_description :
14+ description : " Dispatch description"
15+ required : true
16+ type : string
17+ permissions :
18+ contents : read
19+ id-token : write
20+ jobs :
21+ entropy-tester-image :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : actions/checkout@v2
25+ - name : Set image tag to version of the git tag
26+ if : ${{ startsWith(github.ref, 'refs/tags/entropy-tester-v') }}
27+ run : |
28+ PREFIX="refs/tags/entropy-tester-"
29+ VERSION="${GITHUB_REF:${#PREFIX}}"
30+ echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}"
31+ - name : Set image tag to the git commit hash
32+ if : ${{ !startsWith(github.ref, 'refs/tags/entropy-tester-v') }}
33+ run : |
34+ echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
35+ - name : Log in to the Container registry
36+ uses : docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
37+ with :
38+ registry : ${{ env.REGISTRY }}
39+ username : ${{ github.actor }}
40+ password : ${{ secrets.GITHUB_TOKEN }}
41+ - name : Build docker image
42+ run : |
43+ DOCKER_BUILDKIT=1 docker build --build-arg package="@pythnetwork/entropy-tester" -t ${{ env.REGISTRY }}/pyth-network/entropy-tester:${{ env.IMAGE_TAG }} -f Dockerfile.node .
44+ - name : Push docker image
45+ run : |
46+ docker push ${{ env.REGISTRY }}/pyth-network/entropy-tester:${{ env.IMAGE_TAG }}
You can’t perform that action at this time.
0 commit comments