[rosetta-kaia]_release/v0.0.0 #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: rosetta-kaia master workflow | |
on: | |
pull_request: | |
branches: | |
- master | |
types: [closed] | |
jobs: | |
tagging-master: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create release/tag branch | |
run: | | |
export Branch=${{ github.head_ref }} | |
echo "Create production release tag: ${Branch#*/}" | |
git tag ${Branch#*/} | |
git push origin ${Branch#*/} | |
docker-build: | |
runs-on: ubuntu-latest | |
needs: [tagging-master] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set output | |
id: vars | |
run: | | |
export Branch=${{ github.head_ref }} | |
echo ::set-output name=tag::${Branch#*/} | |
- name: Set up Docker buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Master tag Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: kaiachain/rosetta-kaia:${{ steps.vars.outputs.tag }} | |
- name: Latest tag Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: kaiachain/rosetta-kaia:latest |