DevOps Classroom notes 21/Jul/2026

Github action selfhosted runner:

  1. create linux vm in any cloud

  2. login github and select actions

download and extract runner packages

mkdir actions-runner && cd actions-runner

curl -o actions-runner-linux-x64-2.335.1.tar.gz -L https://github.com/actions/runner/releases/download/v2.335.1/actions-runner-linux-x64-2.335.1.tar.gz

echo "4ef2f25285f0ae4477f1fe1e346db76d2f3ebf03824e2ddd1973a2819bf6c8cf  actions-runner-linux-x64-2.335.1.tar.gz" | shasum -a 256 -c

tar xzf ./actions-runner-linux-x64-2.335.1.tar.gz

Configure

./config.sh --url https://github.com/direct-devops --token CGL7KEXQUPO27KJ63IWHME3KL3V42

./run.sh

./svc.sh install
./svc.sh start
./svc.sh status

Docker Installtion referance

# install docker 

curl -fsSL https://get.docker.com -o install-docker.sh

sudo sh install-docker.sh

sudo usermod -aG docker ubuntu

sudo apt-get install -y uidmap

dockerd-rootless-setuptool.sh install

Variables in github actions:

  1. Enviroment variables:
name: build spring-boot

on: 
  push: 
    branches: 'main'

env:
  docker_org: ramqt2205
  image_version: 1.1.0

jobs:
  build_and_publish_image:
    runs-on: ubuntu-latest
    steps:
      - name: checkout repo branch
        uses: actions/checkout@v7

      - name: Install docker
        uses: docker/setup-buildx-action@v4

      - name: Login to Docker Hub
        uses: docker/login-action@v4
        with:
          username: ramqt2205
          password: ${{ secrets.DOCKER_PAT }}

      - name: Build and push
        uses: docker/build-push-action@v7
        if: ${{ github.ref_name == 'main' }}
        with:
          push: true
          tags: ${{ env.docker_org }}/${{ github.repository }}:${{ env.image_version }}-build-${{ github.run_number }}

default varaibles

Refer_here

soanrqube

Create jfrog free account

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%