From caf478908bcc44853472af614f683bb2fb0d9a83 Mon Sep 17 00:00:00 2001 From: "test-app-or[bot]" <111688381+test-app-or[bot]@users.noreply.github.com> Date: Sun, 24 Sep 2023 08:19:40 +0000 Subject: [PATCH] build(ci): OpenRegistry build and push --- .github/workflows/openregistry.yml | 46 ++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/openregistry.yml diff --git a/.github/workflows/openregistry.yml b/.github/workflows/openregistry.yml new file mode 100644 index 0000000..51c26c6 --- /dev/null +++ b/.github/workflows/openregistry.yml @@ -0,0 +1,46 @@ +name: "Build Container Image" +on: [push, pull_request] + +defaults: + run: + shell: bash +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-docker: + name: "Build Container image" + runs-on: ubuntu-latest + env: + CONTAINER_IMAGE_NAME: openregistry.dev/${{ github.repository }}:${{ github.sha }} + + steps: + - name: Checkout the branch + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + id: buildx + with: + install: true + version: latest + + - name: Login to OpenRegistry + uses: docker/login-action@v2 + with: + registry: openregistry.dev + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build image + uses: docker/build-push-action@v3 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: true + target: runner + tags: ${{ env.CONTAINER_IMAGE_NAME }}