Skip to content

ci

ci #75

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@v2
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push
id: build
uses: docker/build-push-action@v4
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@v2
id: builder
- name: Login to Dockerhub
uses: docker/login-action@v2
with:
username: awharn
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push
id: build
uses: docker/build-push-action@v4
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
uses: benc-uk/workflow-dispatch@v1
with:
ref: refs/heads/master
workflow: ci
repo: awharn-docker/jenkins-nvm-zowe-cli
token: ${{ secrets.PAT }}