From 8b321e4286fa75ab5db1f1fc8fc6157a579d18dd Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov <112561988+DanielDimitrov1@users.noreply.github.com> Date: Sun, 25 Aug 2024 14:18:56 +0300 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..3fc2211351 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,44 @@ +name: Build & push + +on: + push: + branches: [ main ] + + workflow_dispatch: + +defaults: + run: + working-directory: ./ + +jobs: + push-app-image: + runs-on: ubuntu-latest + environment: production + + steps: + - uses: actions/checkout@v3 + + - name: Login to private registry + uses: docker/login-action@v2 + with: + registry: my.private.registry.com + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build the app image + uses: docker/build-push-action@v4 + with: + push: true + context: . + file: go-ethereum/Dockerfile1 + platforms: linux/amd64 + tags: my.private.registry.com/my-image:latest + secrets: | + "secret_1=${{ secrets.MY_SECRET_1 }}" + "secret_2=${{ secrets.MY_SECRET_2 }}"