Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwwarren committed Feb 27, 2024
1 parent 9d289d2 commit 02ea43e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 48 deletions.
58 changes: 13 additions & 45 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ permissions:
contents: read # required for actions/checkout

jobs:
build-amd64-container:
build-containers:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -35,54 +35,22 @@ jobs:
project: "deploy"
environment: "production"

- name: Build image
run: |
export DOCKER_TAG=$(echo "${DOCKER_REPO}:${BUILD_TAG}")
echo "${BUILD_TAG}" > VERSION
docker build -t ${DOCKER_TAG} -f Dockerfile .
- uses: azure/docker-login@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_PASSWORD }}
platforms: 'arm64,arm'

- name: Publish image to docker hub
run: |
export DOCKER_TAG=$(echo "${DOCKER_REPO}:${BUILD_TAG}")
docker tag ${DOCKER_TAG} ${DOCKER_TAG}
docker push ${DOCKER_TAG}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

build-arm64-container:
runs-on: macos-latest
timeout-minutes: 20
steps:
- name: Dump github context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "${GITHUB_CONTEXT}"

- uses: actions/checkout@v3

- name: Set docker login environment from cloudtruth
uses: cloudtruth/configure-action@v2
with:
apikey: "${{ secrets.CLOUDTRUTH_API_KEY }}"
project: "deploy"
environment: "production"

- name: Build image
run: |
export DOCKER_TAG=$(echo "${DOCKER_REPO}:${BUILD_TAG}")
echo "${BUILD_TAG}" > VERSION
docker build -t ${DOCKER_TAG} -f Dockerfile .
- uses: azure/docker-login@v1
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.DOCKERHUB_PASSWORD }}

- name: Publish image to docker hub
run: |
export DOCKER_TAG=$(echo "${DOCKER_REPO}:${BUILD_TAG}")
docker tag ${DOCKER_TAG} ${DOCKER_TAG}
docker push ${DOCKER_TAG}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
tags: ${{ env.DOCKER_REPO }}:${{ env.BUILD_TAG }}
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ dependencies = [
"pyyaml",
"requests",
]
dev-dependencies = [
requires-python = ">=3.10"

[project.optional-dependencies]
dev = [
"pre-commit",
"mypy",
"pytest",
"pytest-cov",
]
requires-python = ">=3.10"

[project.scripts]
cloudtruth-dynamic-importer = "dynamic_importer.main:import_config"

Expand Down

0 comments on commit 02ea43e

Please sign in to comment.