Skip to content

Allow passing build arg when building csi-proxy Host Process Container #30

Allow passing build arg when building csi-proxy Host Process Container

Allow passing build arg when building csi-proxy Host Process Container #30

Workflow file for this run

name: csi-proxy
on:
push:
branches: [ master ]
paths:
- hostprocess/csi-proxy/VERSION
workflow_dispatch:
pull_request:
paths:
- hostprocess/csi-proxy/**
branchs:
- master
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: login to GitHub container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build image for ci
if: ${{ github.event_name == 'pull_request' }}
run: |
cd hostprocess/csi-proxy
./build.sh --version ci
- name: build image for release
if: ${{ github.event_name != 'pull_request' }}
run: |
cd hostprocess/csi-proxy
export version=$(cat VERSION)
./build.sh --version $version --push