| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- # Copyright (C) 2019 Intel Corporation. All rights reserved.
- # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
- name: Create and publish Docker images
- on:
- workflow_call:
- inputs:
- upload_url:
- description: upload binary assets to the URL of release
- type: string
- required: true
- ver_num:
- description: a semantic version number.
- type: string
- required: true
- jobs:
- build-and-push-images:
- runs-on: ubuntu-22.04
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- - name: Build and save Docker image(wasm-debug-server:${{ inputs.ver_num }}) to tar file
- run: |
- docker build -t wasm-debug-server:${{ inputs.ver_num }} .
- docker save -o wasm-debug-server.tar wasm-debug-server:${{ inputs.ver_num }}
- working-directory: test-tools/wamr-ide/WASM-Debug-Server/Docker
- - name: compress the tar file
- run: |
- tar czf wasm-debug-server-${{ inputs.ver_num }}.tar.gz wasm-debug-server.tar
- zip wasm-debug-server-${{ inputs.ver_num }}.zip wasm-debug-server.tar
- working-directory: test-tools/wamr-ide/WASM-Debug-Server/Docker
- - name: upload release tar.gz
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ inputs.upload_url }}
- asset_path: test-tools/wamr-ide/WASM-Debug-Server/Docker/wasm-debug-server-${{ inputs.ver_num }}.tar.gz
- asset_name: wasm-debug-server-${{ inputs.ver_num }}.tar.gz
- asset_content_type: application/x-gzip
- - name: upload release zip
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ inputs.upload_url }}
- asset_path: test-tools/wamr-ide/WASM-Debug-Server/Docker/wasm-debug-server-${{ inputs.ver_num }}.zip
- asset_name: wasm-debug-server-${{ inputs.ver_num }}.zip
- asset_content_type: application/zip
- - name: Build and save Docker image(wasm-toolchain:${{ inputs.ver_num }}) to tar file
- run: |
- docker build -t wasm-toolchain:${{ inputs.ver_num }} .
- docker save -o wasm-toolchain.tar wasm-toolchain:${{ inputs.ver_num }}
- working-directory: test-tools/wamr-ide/WASM-Toolchain/Docker
- - name: compress the tar file
- run: |
- tar czf wasm-toolchain-${{ inputs.ver_num }}.tar.gz wasm-toolchain.tar
- zip wasm-toolchain-${{ inputs.ver_num }}.zip wasm-toolchain.tar
- working-directory: test-tools/wamr-ide/WASM-Toolchain/Docker
- - name: upload release tar.gz
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ inputs.upload_url }}
- asset_path: test-tools/wamr-ide/WASM-Toolchain/Docker/wasm-toolchain-${{ inputs.ver_num }}.tar.gz
- asset_name: wasm-toolchain-${{ inputs.ver_num }}.tar.gz
- asset_content_type: application/x-gzip
- - name: upload release zip
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ inputs.upload_url }}
- asset_path: test-tools/wamr-ide/WASM-Toolchain/Docker/wasm-toolchain-${{ inputs.ver_num }}.zip
- asset_name: wasm-toolchain-${{ inputs.ver_num }}.zip
- asset_content_type: application/zip
|