Skip to content

chore: use https protocol in endpoint (#33) #28

chore: use https protocol in endpoint (#33)

chore: use https protocol in endpoint (#33) #28

#
# Copyright (c) 2022 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
name: Rebuild Devfile Registry
on:
push:
branches:
- 'devspaces-[0-9].[0-9]+-rhel-8'
- devspaces-3-rhel-8
jobs:
publish:
name: publish
runs-on: ubuntu-20.04
steps:
- name: Trigger rebuild of devfile registry
env:
GITHUB_TOKEN: ${{ secrets.CRW_BUILD_TOKEN }}
run: |
export GITHUB_TOKEN=${{ secrets.CRW_BUILD_TOKEN }}
git clone -b "$GITHUB_REF_NAME" "https://github.com/redhat-developer/devspaces.git" ds
cd ds
git config user.email "nickboldt+devstudio-release@gmail.com"
git config user.name "devstudio-release"
git config --global push.default matching
git config --global pull.rebase true
git config --global hub.protocol https
git remote set-url origin https://$GITHUB_TOKEN:x-oauth-basic@github.com/redhat-developer/devspaces.git
sed -i -r -e "s@^Webhook triggered on: .+@Webhook triggered on: $(date) [$GITHUB_REPOSITORY] @" dependencies/che-devfile-registry/webhook_trigger.txt
git commit -m "chore: update webhook_trigger.txt for $GITHUB_REPOSITORY @ $GITHUB_REF_NAME" dependencies/che-devfile-registry/webhook_trigger.txt
git pull origin "$GITHUB_REF_NAME" || true
git push origin "$GITHUB_REF_NAME"