Add node installer retain history #3
Workflow file for this run
This file contains 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: Docker Image CI | |
on: | |
push: | |
branches: [ main ] | |
tags: [ '*' ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
# Required for requesting the GitHub Token | |
id-token: write | |
# Required for pushing images to GitHub Container Registry | |
packages: write | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
buildx: | |
runs-on: nscloud | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v4 | |
- | |
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: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- | |
# Install CLI and authenticate to Namespace | |
name: Install and configure Namespace CLI | |
uses: namespacelabs/nscloud-setup@v0 | |
- | |
# Setup docker build to use your Namespace workspace builder | |
name: Set up Namespace Buildx | |
uses: namespacelabs/nscloud-setup-buildx-action@v0 | |
- | |
name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
platforms: linux/amd64,linux/arm64 | |
# build-args: | | |
# CONTAINERD_RUNWASI=nscr.io/a8fcp47vcfori/build-runwasi | |
tags: ${{ steps.meta.outputs.tags }} | |
file: images/installer/Dockerfile | |
labels: ${{ steps.meta.outputs.labels }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |