|
11 | 11 | - mainnet_next |
12 | 12 |
|
13 | 13 | jobs: |
14 | | - build-docker-image: |
| 14 | + build-production-docker-image: |
15 | 15 | runs-on: ubuntu-latest |
16 | 16 | steps: |
17 | 17 | - name: checkout |
|
41 | 41 | echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT |
42 | 42 | echo "SPEC_NAME=$SPEC_NAME" >> $GITHUB_OUTPUT |
43 | 43 |
|
44 | | - - name: 'Build production ${{ steps.image_tag.outputs.TAG_NAME }} image' |
| 44 | + - name: "Build production ${{ steps.image_tag.outputs.TAG_NAME }} image" |
45 | 45 | if: steps.image_tag.outputs.TAG_NAME != 'master' |
46 | 46 | uses: docker/build-push-action@v3 |
47 | 47 | with: |
|
51 | 51 | build-args: features=--features=${{ steps.image_tag.outputs.SPEC_NAME }},wasmtime |
52 | 52 | tags: docknetwork/dock-substrate:${{ steps.image_tag.outputs.TAG_NAME }} |
53 | 53 |
|
54 | | - - name: 'Build release fastblock_${{ steps.image_tag.outputs.TAG_NAME }} image' |
| 54 | + build-fastblock-docker-image: |
| 55 | + runs-on: ubuntu-latest |
| 56 | + steps: |
| 57 | + - name: checkout |
| 58 | + uses: actions/checkout@v2 |
| 59 | + |
| 60 | + - name: Login to Docker Hub |
| 61 | + uses: docker/login-action@v2 |
| 62 | + with: |
| 63 | + username: ${{ secrets.DOCKER_HUB_USERNAME }} |
| 64 | + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} |
| 65 | + |
| 66 | + - name: Set tag name |
| 67 | + id: image_tag |
| 68 | + shell: bash |
| 69 | + run: | |
| 70 | + export TAG_NAME=master |
| 71 | + if [[ '${{github.ref_name}}' == 'mainnet' || '${{github.ref_name}}' == 'testnet' || '${{github.ref_name}}' == 'mainnet_next' ]]; |
| 72 | + then |
| 73 | + export TAG_NAME=${{github.ref_name}} |
| 74 | + if [[ $TAG_NAME == 'mainnet_next' ]] |
| 75 | + then |
| 76 | + export SPEC_NAME='mainnet' |
| 77 | + else |
| 78 | + export SPEC_NAME=$TAG_NAME |
| 79 | + fi |
| 80 | + fi |
| 81 | + echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT |
| 82 | + echo "SPEC_NAME=$SPEC_NAME" >> $GITHUB_OUTPUT |
| 83 | +
|
| 84 | + - name: "Build release fastblock_${{ steps.image_tag.outputs.TAG_NAME }} image" |
55 | 85 | uses: docker/build-push-action@v3 |
56 | 86 | with: |
57 | 87 | context: . |
|
0 commit comments