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:
|
||||
- uses: actions/checkout@v2
|
||||
- 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
|
||||
- name: Extract branch name
|
||||
shell: bash
|
||||
run: echo "##[set-output name=branch;]$(echo ${GITHUB_BASE_REF#refs/heads/})"
|
||||
id: extract_branch
|
||||
- name: Docker Login
|
||||
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin
|
||||
- name: Docker Login to Docker Registry
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: vulcanizejenkins
|
||||
password: ${{ secrets.VULCANIZEJENKINS_PAT }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
@ -24,4 +25,5 @@ jobs:
|
||||
push: true
|
||||
tags: vulcanize/eth-statediff-service:${{ steps.vars.outputs.tag }}
|
||||
build-args: |
|
||||
BRANCH=${{ steps.extract_branch.outputs.branch }}
|
||||
GIT_COMMIT=${{ steps.vars.outputs.sha }}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user