Skip to content

Set up contexts

Set up contexts #5

name: Build CLI Basic With NPM
on:
push:
paths:
- cli/basic-with-nvm/**
- .github/workflows/cli-basic-with-nvm.yaml
workflow_dispatch:
schedule:
- cron: '0 12 1,15 * *'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Zowe Artifactory
uses: docker/login-action@v2
with:
registry: zowe-docker-snapshot.jfrog.io
username: ${{ secrets.ARTIFACTORY_USERNAME }}
password: ${{ secrets.ARTIFACTORY_PASSWORD }}
- name: Build & Push
id: build
uses: docker/build-push-action@v4
with:
context: cli/basic-with-nvm
push: ${{ github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'push' && github.ref_name == 'main') }}
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/zowe/zowe-sample-dockerfiles-cli-basic-with-npm:latest
zowe-docker-snapshot.jfrog.io/ompzowe/zowe-sample-dockerfiles-cli-basic-with-npm:latest
- name: Image Digest
run: echo ${{ steps.build.outputs.digest }}