Skip to content

Commit

Permalink
fix: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Maurice Faber committed Oct 27, 2020
1 parent 814f04b commit e47c4c0
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,24 @@ jobs:
echo ::set-env name=TAG::$tag
- name: Checkout
uses: actions/checkout@v2
- name: Build and publish clients
run: bin/generate-all.sh && bin/publish-all.sh
- name: CI tests, image build and push tag for master or branch
uses: whoan/docker-build-with-cache-action@v5
with:
username: otomi
password: '${{ secrets.DOCKERHUB_OTOMI_TOKEN }}'
registry: ${{ env.REG }}
image_name: ${{ env.REPO }}
image_tag: ${{ env.TAG }}
build_extra_args: '--build-arg=NPM_TOKEN=${{ secrets.NPM_TOKEN }}'
- if: "contains(github.event.head_commit.message, 'chore(release)')"
name: Tag and release
run: |
RELEASE_TAG=v${COMMIT_MSG#* }
echo "Releasing $REG/$REPO:$RELEASE_TAG"
docker login -u _json_key -p '${{ secrets.DOCKER_PASSWORD }}' $REG
docker tag $REG/$REPO:$TAG $REG/$REPO:latest
docker tag $REG/$REPO:$TAG $REG/$REPO:$RELEASE_TAG
docker push $REG/$REPO:latest
docker push $REG/$REPO:$RELEASE_TAG
echo "Releasing $REPO:$RELEASE_TAG"
docker login -u otomi -p '${{ secrets.DOCKERHUB_OTOMI_TOKEN }}'
docker tag $REPO:$TAG $REPO:latest
docker tag $REPO:$TAG $REPO:$RELEASE_TAG
docker push $REPO:latest
docker push $REPO:$RELEASE_TAG
git config --global user.email "$GIT_USER@users.noreply.github.com"
git config --global user.name $GIT_USER
echo "machine github.com login $GIT_USER password $GIT_PASSWORD" > ~/.netrc
Expand Down

0 comments on commit e47c4c0

Please sign in to comment.