Build chopgo #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build chopgo | |
on: | |
workflow_dispatch | |
#When updating images change image tag below to correspond to changes | |
env: | |
IMAGE_NAME: chopgo | |
IMAGE_TAG: r-4.3.2_python-3_perl-5.38 | |
jobs: | |
build: | |
name: Build | |
#Using ubuntu-22.04 instead of ubuntu-latest to use Docker 24 instead of Docker 25 as it causes gitpod issues | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Clean workspace before start | |
run: rm -rf $GITHUB_WORKSPACE/* | |
- uses: actions/[email protected] | |
- name: Check Docker version | |
run: docker --version | |
- name: Build image | |
id: build-image | |
run: docker build -t ${IMAGE_NAME}:${IMAGE_TAG} -f ${IMAGE_NAME}/Dockerfile . | |
- name: Quay.io login | |
run: docker login -u ${{ secrets.DOCKERBUILD_ROBOT_USERNAME }} --password-stdin <<< ${{ secrets.DOCKERBUILD_ROBOT_PASSWORD }} quay.io | |
- name: Tag image | |
run: docker tag ${IMAGE_NAME}:${IMAGE_TAG} quay.io/ecoflowucl/${IMAGE_NAME}:${IMAGE_TAG} | |
- name: Push image | |
run: docker push quay.io/ecoflowucl/${IMAGE_NAME}:${IMAGE_TAG} | |
- name: Remove docker config | |
run: rm -rf /home/runner/.docker | |
- name: Clean workspace after finish | |
run: rm -rf $GITHUB_WORKSPACE/* |