diff --git a/.github/workflows/testnets.yml b/.github/workflows/testnets.yml new file mode 100644 index 00000000..8c505b71 --- /dev/null +++ b/.github/workflows/testnets.yml @@ -0,0 +1,56 @@ +name: docker-image + +on: + workflow_dispatch: + push: + branches: + - feat/wasm/testnets + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + name: [harkonnen corrino ordos atreides] + + permissions: + contents: read + packages: write + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=${{ matrix.name }} + + - name: Build docker image + uses: docker/build-push-action@v3 + with: + push: true + file: scripts/containers/Dockerfile.alpine + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + build-args: ACC_PREFIX={{ matrix.name }} +