Skip to content

Commit

Permalink
fix: github actions fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
LijuJoseJJ committed Jul 14, 2021
1 parent 4e86a80 commit bcc9634
Showing 1 changed file with 8 additions and 26 deletions.
34 changes: 8 additions & 26 deletions .github/workflows/make-github-docker-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,44 +14,26 @@ jobs:
with:
node-version: '12.x'

- name: docker login
uses: azure/docker-login@v1
with:
login-server: ${{ secrets.GPR_BASE_DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: npm install
run: |
npm ci
env:
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI: true

- name: semantic release
uses: codfish/semantic-release-action@v1
uses: codfish/semantic-release-action@master
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: docker build and push latest
run: |
docker build --build-arg GPR_TOKEN -t $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:latest .
docker push $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:latest
env:
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}
DOCKER_REGISTRY: ${{ secrets.GPR_DOCKER_REGISTRY }}

- name: docker push versions
- name: Docker push version
if: steps.semantic.outputs.new-release-published == 'true'
run: |
docker tag $DOCKER_REGISTRY/zokrates-worker/zokrates-worker $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:$VERSION_TAG
docker tag $DOCKER_REGISTRY/zokrates-worker/zokrates-worker $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:$MAJOR_TAG
docker push $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:$VERSION_TAG
docker push $DOCKER_REGISTRY/zokrates-worker/zokrates-worker:$MAJOR_TAG
docker login https://docker.pkg.github.com -u $GITHUB_ACTOR -p $GPR_TOKEN
docker build --build-arg GPR_TOKEN=$GPR_TOKEN -t docker.pkg.github.com/eyblockchain/zokrates-worker/zokrates-worker:$RELEASE_VERSION .
docker push docker.pkg.github.com/eyblockchain/zokrates-worker/zokrates-worker:$RELEASE_VERSION
env:
DOCKER_REGISTRY: ${{ secrets.GPR_DOCKER_REGISTRY }}
VERSION_TAG: v${{ steps.semantic.outputs.release-version }}
MAJOR_TAG: v${{ steps.semantic.outputs.release-major }}
RELEASE_VERSION: v${{ steps.semantic.outputs.release-version }}
GPR_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit bcc9634

Please sign in to comment.