Skip to content

client+ / prevent project create on operator #62

client+ / prevent project create on operator

client+ / prevent project create on operator #62

Workflow file for this run

# This is a basic workflow to help you get started with Actions
# 1 - Install workflow on tercen stage
# 1.1 - Set workflow Id and step Id as environment variables?
# 2 - run tests
# 3 - build the wheel(?) [ python setup.py bdist_wheel]
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ main, master, stage, prod ]
pull_request:
branches: [ master, stage, prod ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: ENV
run: |
echo "REPO_NAME=${{ github.event.repository.name }}" >> $GITHUB_ENV
echo "TAG=latest" >> $GITHUB_ENV
echo "DOCKER_IMAGE=tercen/${{ github.event.repository.name }}" >> $GITHUB_ENV
echo "DOCKER_IMAGE_FULL=tercen/${{ github.event.repository.name }}:latest" >> $GITHUB_ENV
echo "OPERATOR_DOCKER_IMAGE=$(jq -r '.container' operator.json)" >> $GITHUB_ENV
- name: Build docker image
run: |
docker build -t $DOCKER_IMAGE:$TAG .
- name: docker login
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: docker push
run: |
docker push $DOCKER_IMAGE:$TAG
#- name: Pull tercenctl
# run: docker pull tercen/tercenctl:release
# - name: Install operator
# if: env.OPERATOR_DOCKER_IMAGE == env.DOCKER_IMAGE_FULL
# run: |
# docker run --rm \
# -e TERCEN_USERNAME=${{ secrets.TERCEN_TEST_OPERATOR_USERNAME }} \
# -e TERCEN_PASSWORD=${{ secrets.TERCEN_TEST_OPERATOR_PASSWORD }} \
# -e TERCEN_URI=${{ secrets.TERCEN_TEST_OPERATOR_URI }} \
# -e GITHUB_TOKEN=${GITHUB_TOKEN} \
# tercen/tercenctl:release operator install --rm --tag ${GITHUB_SHA} --repo ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}