Skip to content

docs: update the cli help examples #45

docs: update the cli help examples

docs: update the cli help examples #45

Workflow file for this run

name: docker
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set build tag env vars
run: |
echo "NSC_VERSION=$(cat ./VERSION)" >> $GITHUB_ENV
echo "NSC_COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- id: dockermetadata
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/peterldowns/nix-search-cli
tags: |
# short sha of the commit
type=sha,prefix=,suffix=,format=short
# long sha of the commit
type=sha,prefix=,suffix=,format=long
# "latest"
type=raw,value=${{ env.NSC_VERSION }}
type=raw,value=${{ env.NSC_VERSION }}-commit.${{ env.NSC_COMMIT_SHA }}
type=raw,value=latest
- uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-buildx-action@v2
with:
platforms: linux/amd64,linux/arm64
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.dockermetadata.outputs.tags }}
labels: ${{ steps.dockermetadata.outputs.labels }}
build-args: |
VERSION=${{ env.NSC_VERSION }}
COMMIT_SHA=${{ env.NSC_COMMIT_SHA }}