|
| 1 | +name: Build NCTL Explorer docker image |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - name: Checkout casper-net-sdk repo |
| 11 | + uses: actions/checkout@v3 |
| 12 | + with: |
| 13 | + repository: make-software/casper-net-sdk |
| 14 | + ref: feat-2-0/rc2-tests |
| 15 | + path: casper-net-sdk |
| 16 | + |
| 17 | + - name: Checkout net-sdk-web repo |
| 18 | + uses: actions/checkout@v3 |
| 19 | + with: |
| 20 | + repository: make-software/casper-net-sdk-web |
| 21 | + ref: feat-2.0/rc2-tests |
| 22 | + path: casper-net-sdk-web |
| 23 | + |
| 24 | + - name: Configure AWS credentials |
| 25 | + uses: aws-actions/configure-aws-credentials@v4 |
| 26 | + with: |
| 27 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 28 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 29 | + aws-region: ${{ secrets.AWS_REGION }} |
| 30 | + |
| 31 | + - name: Login to Amazon ECR |
| 32 | + id: login-ecr |
| 33 | + uses: aws-actions/amazon-ecr-login@v2 |
| 34 | + |
| 35 | + - name: Extract metadata (tags, labels) for Docker |
| 36 | + id: meta |
| 37 | + uses: docker/metadata-action@v5 |
| 38 | + with: |
| 39 | + images: | |
| 40 | + ${{ steps.login-ecr.outputs.registry }}/${{ secrets[format('ECR_REPOSITORY_{0}', matrix.repository)] }} |
| 41 | + tags: | |
| 42 | + type=sha |
| 43 | + type=raw,value=latest |
| 44 | + |
| 45 | + - name: Build and push up |
| 46 | + uses: docker/build-push-action@v5 |
| 47 | + with: |
| 48 | + file: casper-net-sdk-web/Docs/Demos/Docker-NCTLWebExplorer/NCTLWebExplorer.Dockerfile |
| 49 | + context: . |
| 50 | + push: true |
| 51 | + tags: ${{ steps.meta.outputs.tags }} |
| 52 | + labels: ${{ steps.meta.outputs.labels }} |
0 commit comments