From 2b1d4297a21cbc6fe2452f080dba05595c12a649 Mon Sep 17 00:00:00 2001 From: retzero Date: Mon, 7 Sep 2020 21:07:52 +0900 Subject: [PATCH] Update release.yml --- .github/workflows/release.yml | 40 +++++++---------------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34869e2..43323e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,6 +11,7 @@ jobs: outputs: studio_version: ${{ steps.version_envs.outputs.STUDIO_VERSION }} tizen_version: ${{ steps.version_envs.outputs.TIZEN_VERSION }} + tag_name: ${{ steps.version_envs.outputs.TAG_NAME }} wide_tag: ${{ steps.version_envs.outputs.WIDE_TAG }} steps: - name: Set env @@ -18,8 +19,8 @@ jobs: run: | echo ::set-output name=STUDIO_VERSION::$(echo ${GITHUB_REF##*/} | cut -c 2- | cut -d'-' -f1) echo ::set-output name=TIZEN_VERSION::$(echo ${GITHUB_REF##*/} | cut -c 2- | cut -d'-' -f2) + echo ::set-output name=TAG_NAME::$(echo ${GITHUB_REF##*/} | cut -c 2-) echo ::set-output name=WIDE_TAG::$(echo ${GITHUB_REF##*/} | cut -c 2- | awk -F'-' '{print $1"-"$2}') - docker_build: name: Build docker image @@ -32,46 +33,21 @@ jobs: - name: Build docker image for tags uses: docker/build-push-action@v1 with: - repository: retzero/tizen-studio - tags: latest,${{ needs.prepare_env.outputs.studio_version }} + repository: temp/workflow + tags: foo push: false build_args: STUDIO_VERSION=${{ needs.prepare_env.outputs.studio_version }},TIZEN_VERSION=${{ needs.prepare_env.outputs.tizen_version }} - name: Run image from registry run: | - k=$(docker run --rm -i retzero/tizen-studio:3.7-5.0 tizen version) + k=$(docker run --rm -i temp/workflow:foo tizen version) if [[ "${k%$'\r'}" != "Tizen CLI "* ]]; then exit 1; fi - name: Push docker image to docker hub uses: docker/build-push-action@v1 with: - #username: ${{ secrets.DOCKER_USERNAME }} - #password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} repository: retzero/tizen-studio - tags: latest,${{ needs.prepare_env.outputs.studio_version }} + tags: ${{ needs.prepare_env.outputs.wide_tag }},${{ needs.prepare_env.outputs.tag_name }} build_args: STUDIO_VERSION=${{ needs.prepare_env.outputs.studio_version }},TIZEN_VERSION=${{ needs.prepare_env.outputs.tizen_version }} - -# - name: Store intermediate docker image -# run: docker save -o workflow-foo.tar localhost:5000/temp/workflow:foo -# -# - name: Store intermediate docker image -# uses: actions/upload-artifact@v2 -# with: -# name: docker_tarball -# path: workflow-foo.tar - -# verify_image: -# name: Verify docker image -# runs-on: ubuntu-latest -# needs: [prepare_env, docker_build] -# steps: -# - name: Retrieve intermediate docker tarball -# uses: actions/download-artifact@v2 -# with: -# name: docker_tarball -# -# - name: Load docker image -# run: docker load -i workflow-foo.tar -# -# - name: Run image from registry -# run: docker run --rm -i localhost:5000/temp/workflow:foo cat ./tizen_version.txt