Skip to content

config-trigger-action #15

config-trigger-action

config-trigger-action #15

Workflow file for this run

name: 4testing multiarch-build
on:
workflow_dispatch:
repository_dispatch:
types:
- trigger-action
- cron-trigger-action
- config-trigger-action
# on:
# workflow_dispatch:
# # schedule:
# # - cron: '*/15 * * * *'
# # - cron: '0 0 * * 0'
env:
DOCKER_PATH: "/install/docker"
REPO: "lemmav"
DOCKER_IMAGE_PREFIX: "4testing-docspace"
DOCKERFILE: "Dockerfile.app"
jobs:
select-branches:
runs-on: self-hosted
steps:
- name: Check out the code
uses: actions/checkout@v2
build:
needs: select-branches
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux/amd64]
branch: ${{ github.event.client_payload.branches }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Free Disk Space
run: |
sudo rm -rf /usr/local/lib/android /opt/ghc
sudo docker image prune --all --force
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build 4testing
run: |
cd .${DOCKER_PATH}
if [ "${{ matrix.branch }}" = "develop" ]; then
DOCKER_TAG="develop.${{ github.run_number }}"
else
DOCKER_TAG=$(echo "${{ matrix.branch }}" | sed '/^release\b\|^hotfix\b\|^feature\b/s/release.*\/\|hotfix.*\/\|feature.*\///; s/-git-action$//; s/^v//').${{github.run_number}}
fi
export DOCKER_TAG
docker buildx bake -f build.yml \
--set *.args.GIT_BRANCH=${{ matrix.branch }} \
--set *.platform=linux/amd64 \
--push
shell: bash