From 2a336612aaa0e959528b35f0c28e402b8d0067c5 Mon Sep 17 00:00:00 2001 From: roybarda Date: Mon, 8 May 2023 10:29:19 +0300 Subject: [PATCH] first try to build in self hosted environment --- .github/workflows/build.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 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 0000000..42c3b16 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,22 @@ +name: 'build' +on: workflow_dispatch + +jobs: + build-on-aws-instace: + runs-on: [self-hosted,linux] + steps: + - uses: actions/checkout@v3 + name: 'check out repository' + + - name: Login to GitHub Container Registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build the hello-docker Docker image + run: | + docker build . --tag ghcr.io/orianelou/hello-docker-gcr-demo:latest + docker run ghcr.io/orianelou/hello-docker-gcr-demo:latest + docker push ghcr.io/orianelou/hello-docker-gcr-demo:latest