mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
ci: pushing artifacts using github actions
As Travis CI `https://travis-ci.org/` is getting
shutdown date on June 15th. Either we need to move
to new place https://www.travis-ci.com/ or we can
switch to github action to push image and the helm
charts when a PR is merged.
fixes: #1781
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c70e46a77c
)
This commit is contained in:
committed by
Madhu Rajanna
parent
51075bc018
commit
b73e8a676c
35
.github/workflows/publish-artifacts.yaml
vendored
Normal file
35
.github/workflows/publish-artifacts.yaml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
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.GITHUB_TOKEN }} CONTAINER_CMD=docker ./deploy.sh
|
Reference in New Issue
Block a user