diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..98ba46b --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,5 @@ +**YouTrack Issues**: +[#HSPC-](https://vyahhi.myjetbrains.com/youtrack/issue/HSPC-) + + +**Description** diff --git a/.github/workflows/actions/build/action.yml b/.github/workflows/actions/build/action.yml new file mode 100644 index 0000000..d539aaa --- /dev/null +++ b/.github/workflows/actions/build/action.yml @@ -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 diff --git a/.github/workflows/auto-author-assign.yml b/.github/workflows/auto-author-assign.yml new file mode 100644 index 0000000..212171e --- /dev/null +++ b/.github/workflows/auto-author-assign.yml @@ -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/auto-author-assign@v1.6.2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..26251be --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/.gitignore b/.gitignore index 1c2d52b..be30d21 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .idea/* +.gradle