mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-27 00:30:18 +00:00
9fde4f7f18
disabling push artifacts github action on the fork repos as it doesnot makes sense to run push actions on the fork repo. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
42 lines
1.3 KiB
YAML
42 lines
1.3 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
|
|
if: github.repository == 'ceph/ceph-csi'
|
|
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: Set build environment variables
|
|
run: |
|
|
echo "GITHUB_USER=${{ secrets.CEPH_CSI_BOT_NAME }}" >> $GITHUB_ENV
|
|
echo "GITHUB_EMAIL=${{ secrets.CEPH_CSI_BOT_EMAIL }}" >> $GITHUB_ENV
|
|
echo "GITHUB_TOKEN=${{ secrets.CEPH_CSI_BOT_TOKEN }}" >> $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
|
|
run: CONTAINER_CMD=docker ./deploy.sh
|