2021-06-08 05:53:35 +00:00
|
|
|
---
|
|
|
|
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*'
|
2022-05-01 01:00:30 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-06-08 05:53:35 +00:00
|
|
|
jobs:
|
|
|
|
push:
|
|
|
|
name: Publish artifacts
|
|
|
|
runs-on: ubuntu-latest
|
2021-06-17 06:22:01 +00:00
|
|
|
if: github.repository == 'ceph/ceph-csi'
|
2021-06-08 05:53:35 +00:00
|
|
|
steps:
|
2023-09-04 20:50:18 +00:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-08 05:53:35 +00:00
|
|
|
|
|
|
|
- name: Login to Quay
|
2023-09-18 20:46:16 +00:00
|
|
|
uses: docker/login-action@v3
|
2021-06-08 05:53:35 +00:00
|
|
|
with:
|
|
|
|
registry: quay.io
|
|
|
|
username: ${{ secrets.QUAY_IO_USERNAME }}
|
|
|
|
password: ${{ secrets.QUAY_IO_PASSWORD }}
|
|
|
|
|
2021-06-10 10:49:54 +00:00
|
|
|
- name: Set build environment variables
|
|
|
|
run: |
|
2021-11-22 06:06:15 +00:00
|
|
|
echo "BRANCH_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
2021-06-10 10:49:54 +00:00
|
|
|
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
|
|
|
|
|
2021-06-08 05:53:35 +00:00
|
|
|
- name: publish artifacts
|
|
|
|
# podman cannot pull images with both tag and digest
|
|
|
|
# https://github.com/containers/buildah/issues/1407
|
|
|
|
# use docker to build images
|
2021-06-10 10:49:54 +00:00
|
|
|
run: CONTAINER_CMD=docker ./deploy.sh
|