Closed
Description
openedon Oct 1, 2023
Contributing guidelines
- I've read the contributing guidelines and wholeheartedly agree
I've found a bug, and:
- The documentation does not mention anything about my problem
- There are no open or closed issues that are related to my problem
Description
I had a workflow that looked something like this for my qa branch:
on:
pull_request:
types:
- closed
branches:
- qa
jobs:
deploy-docker-qa:
runs-on: ubuntu-latest
steps:
- name: BTC (build to cache)
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build :qa tag and push to Docker Hub
uses: docker/build-push-action@v3
with:
push: true
tags: marceliux/jardinbinario:qa
build-args: |
"NEXT_PUBLIC_BACKEND_URL=${{ secrets.NEXT_PUBLIC_BACKEND_URL }}"
"NEXT_PUBLIC_PLACEHOLDER_IMAGE=${{ secrets.NEXT_PUBLIC_PLACEHOLDER_IMAGE }}"
"NEXT_PUBLIC_UPLOAD_IMAGE=${{ secrets.NEXT_PUBLIC_UPLOAD_IMAGE }}"
"NEXT_PUBLIC_CLOUDINARY_UPLOAD_URL=${{ secrets.NEXT_PUBLIC_CLOUDINARY_UPLOAD_URL }}"
cache-from: type=gha
cache-to: type=gha,mode=max
I tried adding a new workflow which implemented a new arch as we have a couple of RPI clusters to load QA efforts into them which use armv7l for each branch and ended up looking something like this:
But it's taking too long, not sure if I leave it for 5+ it will complete.
Expected behaviour
To complete armv7 and amd64 builds and push them.
Actual behaviour
Taking up to 5h for building and not really sure if working.
Repository URL
https://github.com/amLiux/JardinBinario
Workflow run URL
https://github.com/amLiux/JardinBinario/actions/runs/6366029508
YAML workflow
on:
pull_request_target:
types:
- closed
pull_request:
branches:
- 'dev'
jobs:
dev_branches:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
DOCKER_TAG:
steps:
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Process branch name to meet valid sintax (lowercase and remove -)
id: process_branch
run: |
branch_name="${{ steps.extract_branch.outputs.branch }}"
lowercase_branch_name="${branch_name,,}"
underscored_branch_name="${lowercase_branch_name//-/_}"
echo "processed_branch=$underscored_branch_name" >> $GITHUB_OUTPUT
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v2
with:
image: tonistiigi/binfmt:latest
platforms: armv7l, amd64
- name: BTC (build to cache)
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Set dynamic branch Docker tag
id: set_docker_tag
run: echo "DOCKER_TAG=marceliux/jardinbinario:${{ steps.process_branch.outputs.processed_branch }}" >> $GITHUB_ENV
- name: Build dev branch tag and push to Docker Hub
uses: docker/build-push-action@v3
with:
push: true
platforms: linux/amd64,linux/arm/v7
tags: ${{ env.DOCKER_TAG }}
build-args: |
"NEXT_PUBLIC_BACKEND_URL=${{ secrets.NEXT_PUBLIC_BACKEND_URL }}"
"NEXT_PUBLIC_PLACEHOLDER_IMAGE=${{ secrets.NEXT_PUBLIC_PLACEHOLDER_IMAGE }}"
"NEXT_PUBLIC_UPLOAD_IMAGE=${{ secrets.NEXT_PUBLIC_UPLOAD_IMAGE }}"
"NEXT_PUBLIC_CLOUDINARY_UPLOAD_URL=${{ secrets.NEXT_PUBLIC_CLOUDINARY_UPLOAD_URL }}"
cache-from: type=gha
cache-to: type=gha,mode=max
Workflow logs
BuildKit logs
No response
Additional info
No response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels