diff --git a/.github/workflows/pipeline.yaml b/.github/workflows/pipeline.yaml index 7b816cc..239d6cc 100644 --- a/.github/workflows/pipeline.yaml +++ b/.github/workflows/pipeline.yaml @@ -44,21 +44,26 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v2 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@4 with: context: . push: true + platforms: linux/arm64,linux/amd64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index f0e3f24..12cdbcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,4 +15,4 @@ RUN curl -sSL https://install.python-poetry.org | python3 - ENV PATH=/root/.local/bin:$PATH RUN poetry install -ENTRYPOINT ["poetry", "run", "python", "-m" , "app.main"] +ENTRYPOINT ["poetry", "run", "python", "main.py"] diff --git a/app/main.py b/app/main.py index ea9ee75..fa7e9f1 100644 --- a/app/main.py +++ b/app/main.py @@ -66,7 +66,7 @@ class Main: DELAY_SECONDS = 30.0 -def entry(): +def entry() -> None: logger.info("Initiating main...") start_time = time.time() main = Main()