Skip to content

aramovic79 is testing out apeirora GitHub Actions #185

aramovic79 is testing out apeirora GitHub Actions

aramovic79 is testing out apeirora GitHub Actions #185

name: GitHub Actions ApeiroRA OWS3
run-name: ${{ github.actor }} is testing out apeirora GitHub Actions
on: [push]
jobs:
ApeiroRA-OWS3-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job is running on a ${{ runner.os }} server and was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🔎 The name of the branch is ${{ github.ref }} and repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- name: Run tests using make
run: make tmptest
- name: Check and install make
run: |
if ! command -v make &> /dev/null
then
echo "make could not be found, installing..."
sudo apt-get update
sudo apt-get install -y make
else
echo "make is already installed"
fi
- name: Check and install kubectl
run: |
if ! command -v kubectl &> /dev/null
then
echo "kubectl could not be found, installing..."
curl -Lo kubectl https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
else
echo "kubectl is already installed"
fi
- name: Check and install uuidgen and then set GCTL_SESSION_ID
run: |
if ! command -v uuidgen &> /dev/null
then
echo "uuidgen could not be found, installing..."
sudo apt-get update
sudo apt-get install -y uuid-runtime
else
echo "uuidgen is already installed"
fi
echo "GCTL_SESSION_ID=$(uuidgen)" >> $GITHUB_ENV
- name: Check and install brew, gardenctl and kubelogin; publish afterwards
run: |
if ! command -v brew &> /dev/null
then
echo "brew could not be found, installing..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
echo 'export PATH="${BREW_ROOT:-$HOME/linuxbrew/.linuxbrew}/bin:$PATH"' >> $GITHUB_ENV
echo 'export PATH="${BREW_ROOT:-$HOME/linuxbrew/.linuxbrew}/sbin:$PATH"' >> $GITHUB_ENV
else
echo "brew is already installed"
fi
if ! command -v gardenctl &> /dev/null
then
echo "gardenctl could not be found, installing..."
brew install gardener/tap/gardenctl-v2
echo 'export PATH="${GARDENCTL_ROOT:-$HOME/linuxbrew/.linuxbrew}/bin/gardenctl:$PATH"' >> $GITHUB_ENV
else
echo "gardenctl is already installed"
fi
if ! command -v gardenlogin &> /dev/null
then
echo "gardenlogin could not be found, installing..."
brew install gardener/tap/gardenlogin
else
echo "gardenlogin is already installed"
fi
if ! command -v kubelogin &> /dev/null
then
echo "kubelogin could not be found, installing..."
brew install int128/kubelogin/kubelogin
else
echo "kubelogin is already installed"
fi
make k8
env:
GARDEN_OWS3_PATH: ${{ secrets.GARDEN_OWS3_PATH }}
K8_CLUSTER_PATH: ${{ secrets.K8_CLUSTER_PATH }}
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
JF_URL: ${{ secrets.JF_URL }}
# - name: Apply Kubernetes configuration
# run: |
# make k8-apply
# env:
# K8_CLUSTER_PATH: ${{ secrets.K8_CLUSTER_PATH }}
- run: echo "🍏 This job's status is ${{ job.status }}."