v0.0.10 #13
Workflow file for this run
This file contains hidden or 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: build and release docker images | |
on: | |
release: | |
types: [created] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: "1.19.3" | |
check-latest: true | |
- uses: actions/checkout@v2 | |
- name: Prepare Release Variables | |
id: vars | |
uses: ignite/cli/actions/release/vars@main | |
- name: build | |
run: | | |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u "${{ secrets.GHCR_USER }}" --password-stdin | |
docker build . --tag ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} -f Dockerfile | |
docker push ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} | |
- uses: actions/setup-go@v5 | |
- name: Download and Setup container2wasm | |
run: | | |
wget https://github.com/ktock/container2wasm/releases/download/v0.6.5/container2wasm-v0.6.5-linux-amd64.tar.gz | |
tar -xzf container2wasm-v0.6.5-linux-amd64.tar.gz | |
chmod +x c2w | |
sudo mv c2w /usr/local/bin/c2w | |
- name: Build using container2wasm | |
run: | | |
c2w ghcr.io/${{ github.repository }}:${{ steps.vars.outputs.tag_name }} -o sd.wasm | |
- name: upload artifact | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: sd.wasm | |
asset_name: sd.wasm | |
asset_content_type: application/binary |