diff options
Diffstat (limited to '.github/actions/container_build/action.yml')
-rw-r--r-- | .github/actions/container_build/action.yml | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/actions/container_build/action.yml b/.github/actions/container_build/action.yml new file mode 100644 index 0000000..bef1441 --- /dev/null +++ b/.github/actions/container_build/action.yml @@ -0,0 +1,46 @@ +--- +name: Build +inputs: + target: + required: true + dockerhub_username: + required: true + dockerhub_password: + required: true +runs: + using: composite + steps: + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up buildx + uses: docker/setup-buildx-action@v2 + - name: Set up TARGET + run: echo "TARGET=${{ inputs.target }}" | tee $GITHUB_ENV + shell: bash + - name: Build image + if: startswith(inputs.target, 'stage3') || startswith(inputs.target, 'portage') + shell: bash + run: ./build.sh + - name: Build python image + if: startswith(inputs.target, 'python') + shell: bash + run: ./build-python.sh + - name: Inspect image + shell: bash + run: docker image inspect "${ORG}/${TARGET/-/:}" + - name: Inspect portage + if: matrix.target != 'portage' + shell: bash + run: docker run --rm "${ORG}/${TARGET/-/:}" emerge --info + - name: Login to DockerHub + uses: docker/login-action@v2 + if: github.event_name == 'schedule' + with: + username: ${{ inputs.dockerhub_username }} + password: ${{ inputs.dockerhub_password }} + - name: Push image + if: github.event_name == 'schedule' + shell: bash + env: + DOCKER_CLI_EXPERIMENTAL: enabled + run: ./deploy.sh |