Skip to content

ci

ci #111

Workflow file for this run

name: ci
on:
push:
branches:
- 'master'
workflow_dispatch:
schedule:
- cron: '0 12 * * 0'
env:
MAIN_NODE_VERSION: 18
jobs:
build-and-deploy-x64:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push
id: build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64
build-args: |
IMAGE_VERSION_ARG=${{ matrix.node }}
tags: |
awharn/jenkins-nvm-keytar:${{ matrix.node }}
ghcr.io/awharn-docker/jenkins-nvm-keytar:${{ matrix.node }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'awharn/jenkins-nvm-keytar:latest' || '' }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'ghcr.io/awharn-docker/jenkins-nvm-keytar:latest' || '' }}
- name: Image Digest
run: echo ${{ steps.build.outputs.digest }}
build-and-deploy-arm:
runs-on: fastarm
strategy:
fail-fast: false
matrix:
node: [16, 18, 20]
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: false
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
logout: false
- name: Build & Push
id: build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/arm64
build-args: |
IMAGE_VERSION_ARG=${{ matrix.node }}
tags: |
awharn/jenkins-nvm-keytar-arm:${{ matrix.node }}
ghcr.io/awharn-docker/jenkins-nvm-keytar-arm:${{ matrix.node }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'awharn/jenkins-nvm-keytar-arm:latest' || '' }}
${{ matrix.node == env.MAIN_NODE_VERSION && 'ghcr.io/awharn-docker/jenkins-nvm-keytar-arm:latest' || '' }}
builder: ${{ steps.builder.outputs.name }}
- name: Image Digest
run: echo ${{ steps.build.outputs.digest }}
update-downstream:
runs-on: ubuntu-20.04
needs: [build-and-deploy-x64, build-and-deploy-arm]
steps:
- name: Update Downstream
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
run: gh workflow run -R awharn-docker/jenkins-nvm-zowe-cli -r master ci.yml