ceph-csi/.github/workflows/publish-artifacts.yaml
Madhu Rajanna 2eebf6b6e0 build: use cephcsi bot token to push helm charts
GITHUB_TOKEN is auto generated for cephcsi repo
and it cannot be used to push helm charts to
different repo. added new secret CEPH_CSI_BOT_TOKEN
to push helm charts.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-06-10 12:56:10 +05:30

36 lines
1.1 KiB
YAML

---
name: publish artifacts
# yamllint disable-line rule:truthy
on:
push:
# Sequence of patterns matched against refs/heads
branches:
# Push events on default branch
- devel
# Push events to branches matching refs/heads/release-v*
- 'release-v*'
jobs:
push:
name: Publish artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Quay
uses: docker/login-action@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
- name: Set build environment based on Git branch name
if: github.ref == 'refs/heads/devel'
run: echo "BRANCH_NAME=devel" >> $GITHUB_ENV
- name: publish artifacts
# podman cannot pull images with both tag and digest
# https://github.com/containers/buildah/issues/1407
# use docker to build images
# yamllint disable-line rule:line-length
run: GITHUB_TOKEN=${{ secrets.CEPH_CSI_BOT_TOKEN }} CONTAINER_CMD=docker ./deploy.sh