diff --git a/.gitea/workflows/build-an-push.yaml b/.gitea/workflows/build-an-push.yaml index 9111afa..e87cebe 100644 --- a/.gitea/workflows/build-an-push.yaml +++ b/.gitea/workflows/build-an-push.yaml @@ -6,19 +6,32 @@ on: - master jobs: - docker: + build: + name: Build and push image runs-on: ubuntu-latest - services: - registry: - image: registry:2 - ports: - - 32000:32000 + container: catthehacker/ubuntu:act-latest + steps: - - name: checkout code - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Build Docker image - run: docker build . --file Dockerfile --tag localhost:32000/scrapper:latest + - name: Create Kubeconfig + run: | + mkdir $HOME/.kube + echo "${{ secrets.KUBECONFIG_BUILDX }}" > $HOME/.kube/config - - name: push image to registry - run: docker push localhost:32000/scrapper:latest + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + driver: kubernetes + driver-opts: | + namespace=act-runner + qemu.install=true + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: . + push: true + platforms: linux/arm64 + tags: | + localhost:32000/scrapper:latest