Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does this fix the lack of dockerfile #9

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 57 additions & 14 deletions .github/workflows/publish-tr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,60 @@ jobs:
# git commit -am "generated text-reading"
# git push

bake:
needs:
- tag-generator
- make-dockerfile
uses: darpa-askem/.github/.github/workflows/bake-publish.yaml@main
with:
file: 'docker-bake.hcl'
group: 'tr'
registry: 'ghcr.io'
organization: ${{ github.repository_owner }}
tag: ${{ needs.tag-generator.outputs.image-tag }}
secrets:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# bake:
# needs:
# - tag-generator
# - make-dockerfile
# uses: darpa-askem/.github/.github/workflows/bake-publish.yaml@main
# with:
# file: 'docker-bake.hcl'
# group: 'tr'
# registry: 'ghcr.io'
# organization: ${{ github.repository_owner }}
# tag: ${{ needs.tag-generator.outputs.image-tag }}
# secrets:
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Create matrix
id: targets
run: |
docker buildx bake tr -f docker-bake.hcl --print
TARGETS=$(docker buildx bake tr -f docker-bake.hcl --print | jq -cr ".group.tr.targets")
echo "matrix=$TARGETS" >> $GITHUB_OUTPUT

# 1.3 (optional) - output the generated target list for verification
- name: Show matrix
run: |
echo ${{ steps.targets.outputs.matrix }}

- name: set env variables for bakefile
run: |
# Lowercase the inputs for Docker image naming conventions
TAG=${{ needs.tag-generator.outputs.image-tag }}
ORG=${{ github.repository_owner }}
REG=ghcr.io

echo "VERSION=${TAG,,}" >> ${GITHUB_ENV}
echo "DOCKER_REGISTRY=${REG,,}" >> ${GITHUB_ENV}
echo "DOCKER_ORG=${ORG,,}" >> ${GITHUB_ENV}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
image=moby/buildkit:v0.10.6

- name: Build Images using BuildX Bake
uses: docker/bake-action@v2
with:
files: ./docker-bake.hcl
targets: ${{ matrix.target }}
no-cache: false
push: true
set: |
*.cache-from=type=gha,scope=build-${{ matrix.target }}
*.cache-to=type=gha,scope=build-${{ matrix.target }},mode=max
Loading