From dac8d344bf2de5de74174bbdc686ca4a7fbfb92a Mon Sep 17 00:00:00 2001 From: "test-app-or[bot]" <111688381+test-app-or[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:11:59 +0000 Subject: [PATCH] build(ci): OpenRegistry build and push --- .github/workflows/openregistry.yml | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 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..f81af2d --- /dev/null +++ b/.github/workflows/openregistry.yml @@ -0,0 +1,42 @@ +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: "http://localhost:5000/yami/github-automation-test:${{ github.sha }}" + + steps: + - name: Checkout the branch + uses: actions/checkout@v4 + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v3 + id: buildx + with: + install: true + version: latest + - name: Login to OpenRegistry + uses: docker/login-action@v3 + with: + registry: http://localhost:5000 + username: yami + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build image + uses: docker/build-push-action@v5 + with: + context: . + file: Dockerfile + platforms: linux/amd64 + push: true + target: runner + tags: ${{ env.CONTAINER_IMAGE_NAME }} +{}