Build for arm64 and amd64
This commit is contained in:
11
.github/workflows/pipeline.yaml
vendored
11
.github/workflows/pipeline.yaml
vendored
@@ -44,21 +44,26 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
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
|
- name: Log in to the Container registry
|
||||||
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
|
uses: docker/metadata-action@v2
|
||||||
with:
|
with:
|
||||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
|
uses: docker/build-push-action@4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
|
platforms: linux/arm64,linux/amd64
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
|||||||
@@ -15,4 +15,4 @@ RUN curl -sSL https://install.python-poetry.org | python3 -
|
|||||||
ENV PATH=/root/.local/bin:$PATH
|
ENV PATH=/root/.local/bin:$PATH
|
||||||
RUN poetry install
|
RUN poetry install
|
||||||
|
|
||||||
ENTRYPOINT ["poetry", "run", "python", "-m" , "app.main"]
|
ENTRYPOINT ["poetry", "run", "python", "main.py"]
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ class Main:
|
|||||||
DELAY_SECONDS = 30.0
|
DELAY_SECONDS = 30.0
|
||||||
|
|
||||||
|
|
||||||
def entry():
|
def entry() -> None:
|
||||||
logger.info("Initiating main...")
|
logger.info("Initiating main...")
|
||||||
start_time = time.time()
|
start_time = time.time()
|
||||||
main = Main()
|
main = Main()
|
||||||
|
|||||||
Reference in New Issue
Block a user