Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
meanmail committed Sep 19, 2023
1 parent 731b576 commit 908d748
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**YouTrack Issues**:
[#HSPC-](https://vyahhi.myjetbrains.com/youtrack/issue/HSPC-)


**Description**
37 changes: 37 additions & 0 deletions .github/workflows/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build image

inputs:
path:
description: 'Image path'
required: true
dockerfile:
description: 'Dockerfile'
required: true
default: 'Dockerfile'
image_name_tag:
description: 'Image name:tag'
required: true

runs:
using: "composite"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: hyperskill.azurecr.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build base
uses: docker/build-push-action@v3
with:
context: ${{ inputs.path }}
pull: true
push: true
file: ${{ inputs.path }}/${{ inputs.dockerfile }}
tags: hyperskill.azurecr.io/epicbox/${{ inputs.image_name_tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
15 changes: 15 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Auto Author Assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: [self-hosted, small]
if: ${{ !github.event.pull_request.assignee }}
steps:
- uses: toshimaru/[email protected]
24 changes: 24 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI
on:
push:
branches:
- 'master'
- 'release/**'
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }}

jobs:
build_bash_image:
name: Build epicbox-base image
runs-on: [self-hosted, small]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build
uses: ./.github/workflows/actions/build
with:
path: epicbox-base/debian/bullseye
image_tag: debian:bullseye-${{ github.sha }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea/*
.gradle

0 comments on commit 908d748

Please sign in to comment.