Skip to content

Commit 62e26f1

Browse files
Fix build (#34)
* change dockerfile * change release * fix skip build * fix env values * fix envs
1 parent 3b45de3 commit 62e26f1

File tree

1 file changed

+23
-9
lines changed

1 file changed

+23
-9
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ on:
2626
jobs:
2727
release:
2828
runs-on: ubuntu-latest
29+
outputs:
30+
NEW_VERSION: ${{ steps.output_version.outputs.NEW_VERSION }}
2931
steps:
3032
- name: Checkout repository
3133
uses: actions/checkout@v2
@@ -70,39 +72,47 @@ jobs:
7072
makeLatest: ${{ inputs.latest }}
7173
tag: ${{ env.NEW_VERSION }}
7274

75+
- name: Output new version
76+
id: output_version
77+
run: |
78+
echo NEW_VERSION=${{ env.NEW_VERSION }} >> $GITHUB_OUTPUT
7379
define_envs:
7480
runs-on: ubuntu-latest
81+
outputs:
82+
REPO_NAME: ${{ steps.get_repo_name.outputs.REPO_NAME }}
83+
REPO_FULL_NAME: ${{ steps.get_repo_full_name.outputs.REPO_FULL_NAME }}
84+
CURRENT_DATE_TIME: ${{ steps.get_current_date_time.outputs.CURRENT_DATE_TIME }}
7585
steps:
7686
- name: Get repo name
7787
shell: bash
7888
id: get_repo_name
7989
run: |
80-
echo "REPO_NAME=$(basename "${{ github.repository }}")" >> $GITHUB_ENV
90+
echo "REPO_NAME=$(basename "${{ github.repository }}")" >> $GITHUB_OUTPUT
8191
8292
- name: Get repo full name
8393
shell: bash
8494
id: get_repo_full_name
8595
run: |
8696
FULL_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
87-
echo "REPO_FULL_NAME=$FULL_NAME" >> $GITHUB_ENV
97+
echo "REPO_FULL_NAME=$FULL_NAME" >> $GITHUB_OUTPUT
8898
8999
- name: Get current date and time
90100
shell: bash
91101
id: get_current_date_time
92102
run: |
93-
echo "CURRENT_DATE_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV
94-
outputs:
95-
repo_name: ${{ steps.get_repo_name.outputs.stdout }}
96-
repo_full_name: ${{ steps.get_repo_full_name.outputs.stdout }}
97-
current_date_time: ${{ steps.get_current_date_time.outputs.stdout }}
103+
echo "CURRENT_DATE_TIME=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
98104
99105
build-service:
100106
runs-on: ubuntu-latest
101107
needs: [release, define_envs]
102108
steps:
103109
- name: Get output variables from define_envs job
104110
id: get_env_vars
105-
run: echo "::set-output name=repo_name::${{ needs.define_envs.outputs.repo_name }}::set-output name=repo_full_name::${{ needs.define_envs.outputs.repo_full_name }}::set-output name=current_date_time::${{ needs.define_envs.outputs.current_date_time }}"
111+
run: |
112+
echo "REPO_NAME=${{ needs.define_envs.outputs.repo_name }} >> $GITHUB_ENV"
113+
echo "REPO_FULL_NAME=${{ needs.define_envs.outputs.repo_full_name }} >> $GITHUB_ENV"
114+
echo "CURRENT_DATE_TIME=${{ needs.define_envs.outputs.current_date_time }} >> $GITHUB_ENV"
115+
echo "NEW_VERSION=${{ needs.release.outputs.NEW_VERSION }} >> $GITHUB_ENV"
106116
107117
- name: Define service tags
108118
run: |
@@ -139,7 +149,11 @@ jobs:
139149
steps:
140150
- name: Get output variables from define_envs job
141151
id: get_env_vars
142-
run: echo "::set-output name=repo_name::${{ needs.define_envs.outputs.repo_name }}::set-output name=repo_full_name::${{ needs.define_envs.outputs.repo_full_name }}::set-output name=current_date_time::${{ needs.define_envs.outputs.current_date_time }}"
152+
run: |
153+
echo "REPO_NAME=${{ needs.define_envs.outputs.repo_name }} >> $GITHUB_ENV"
154+
echo "REPO_FULL_NAME=${{ needs.define_envs.outputs.repo_full_name }} >> $GITHUB_ENV"
155+
echo "CURRENT_DATE_TIME=${{ needs.define_envs.outputs.current_date_time }} >> $GITHUB_ENV"
156+
echo "NEW_VERSION=${{ needs.release.outputs.NEW_VERSION }} >> $GITHUB_ENV"
143157
144158
- name: Define app tags
145159
run: |

0 commit comments

Comments
 (0)