diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3fcd25f..579dd0e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -29,11 +29,14 @@ jobs: needs: [ Prepare ] uses: ./.github/workflows/sub_description.yaml secrets: inherit + with: + DOCKERHUB_REPO: {{ env.DOCKERHUB_REPO}} R2020a: needs: [ Prepare ] uses: ./.github/workflows/sub_release.yaml with: + DOCKERHUB_REPO: {{ env.DOCKERHUB_REPO}} DOCKERHUB_TAG: R2020a DOCKER_CONTEXT: R2020a is_latest: true diff --git a/.github/workflows/sub_description.yaml b/.github/workflows/sub_description.yaml index d230464..23bc408 100644 --- a/.github/workflows/sub_description.yaml +++ b/.github/workflows/sub_description.yaml @@ -7,6 +7,10 @@ name: Description on: workflow_call: + inputs: + DOCKERHUB_REPO: + required: true + type: string secrets: DOCKERHUB_USERNAME: required: true @@ -25,4 +29,4 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: ${{ env.DOCKERHUB_REPO }} \ No newline at end of file + repository: ${{ inputs.DOCKERHUB_REPO }} \ No newline at end of file diff --git a/.github/workflows/sub_release.yaml b/.github/workflows/sub_release.yaml index 8595350..635941c 100644 --- a/.github/workflows/sub_release.yaml +++ b/.github/workflows/sub_release.yaml @@ -8,6 +8,9 @@ name: Release on: workflow_call: inputs: + DOCKERHUB_REPO: + required: true + type: string DOCKERHUB_TAG: required: true type: string @@ -31,17 +34,17 @@ jobs: with: context: ./${{ inputs.DOCKER_CONTEXT }} tags: | - ${{ env.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} - ${{ inputs.is_latest && format('{0}:latest', env.DOCKERHUB_REPO) || '' }} + ${{ inputs.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} + ${{ inputs.is_latest && format('{0}:latest', inputs.DOCKERHUB_REPO) || '' }} # outputs: type=docker,dest=/tmp/myimage.tar - name: Inspect run: | - docker image inspect ${{ env.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} + docker image inspect ${{ inputs.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} - name: Test run: | - docker run --rm ${{ env.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} echo "TODO: ADD MCR TEST" + docker run --rm ${{ inputs.DOCKERHUB_REPO }}:${{ inputs.DOCKERHUB_TAG }} echo "TODO: ADD MCR TEST" # -