From f03b7e519e90a4c55043c1b199170f8034feddb0 Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Wed, 17 Jun 2026 00:28:39 +0300 Subject: [PATCH] ci(github): add develop workflow Introduce a GitHub Actions workflow for the `main` branch that builds and pushes a Docker image to GitHub Container Registry. Includes concurrency control, permissions, Docker Buildx setup, and caching configuration. --- .github/workflows/develop.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/develop.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 00000000..9672f362 --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,44 @@ +name: Develop + +on: + push: + branches: + - main + +concurrency: + group: develop-${{ github.ref }} + cancel-in-progress: true + +permissions: + contents: read + packages: write + +env: + IMAGE: ghcr.io/vvzvlad/gitmost + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push develop image + uses: docker/build-push-action@v6 + with: + context: . + platforms: linux/amd64 + push: true + tags: ${{ env.IMAGE }}:develop + cache-from: type=gha,scope=develop-amd64 + cache-to: type=gha,scope=develop-amd64,mode=max