Use commit hash to build docker image and publish.
This commit is contained in:
parent
e08d31e242
commit
747c5f5400
18
.github/workflows/publish.yaml
vendored
18
.github/workflows/publish.yaml
vendored
@ -9,14 +9,15 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Get the version
|
- name: Get the version
|
||||||
run: echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
run: |
|
||||||
|
echo ::set-output name=tag::$(echo ${GITHUB_REF#refs/tags/})
|
||||||
|
echo ::set-output name=sha::$(echo ${GITHUB_SHA})
|
||||||
id: vars
|
id: vars
|
||||||
- name: Extract branch name
|
- name: Docker Login to Docker Registry
|
||||||
shell: bash
|
uses: docker/login-action@v1
|
||||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF#refs/heads/})"
|
with:
|
||||||
id: extract_branch
|
username: vulcanizejenkins
|
||||||
- name: Docker Login
|
password: ${{ secrets.VULCANIZEJENKINS_PAT }}
|
||||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
@ -24,4 +25,5 @@ jobs:
|
|||||||
push: true
|
push: true
|
||||||
tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }}
|
tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }}
|
||||||
build-args: |
|
build-args: |
|
||||||
BRANCH=${{ steps.extract_branch.outputs.branch }}
|
GIT_COMMIT=${{ steps.vars.outputs.sha }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user