|
26 | 26 | jobs: |
27 | 27 | release: |
28 | 28 | runs-on: ubuntu-latest |
| 29 | + outputs: |
| 30 | + NEW_VERSION: ${{ steps.output_version.outputs.NEW_VERSION }} |
29 | 31 | steps: |
30 | 32 | - name: Checkout repository |
31 | 33 | uses: actions/checkout@v2 |
@@ -70,39 +72,47 @@ jobs: |
70 | 72 | makeLatest: ${{ inputs.latest }} |
71 | 73 | tag: ${{ env.NEW_VERSION }} |
72 | 74 |
|
| 75 | + - name: Output new version |
| 76 | + id: output_version |
| 77 | + run: | |
| 78 | + echo NEW_VERSION=${{ env.NEW_VERSION }} >> $GITHUB_OUTPUT |
73 | 79 | define_envs: |
74 | 80 | 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 }} |
75 | 85 | steps: |
76 | 86 | - name: Get repo name |
77 | 87 | shell: bash |
78 | 88 | id: get_repo_name |
79 | 89 | run: | |
80 | | - echo "REPO_NAME=$(basename "${{ github.repository }}")" >> $GITHUB_ENV |
| 90 | + echo "REPO_NAME=$(basename "${{ github.repository }}")" >> $GITHUB_OUTPUT |
81 | 91 |
|
82 | 92 | - name: Get repo full name |
83 | 93 | shell: bash |
84 | 94 | id: get_repo_full_name |
85 | 95 | run: | |
86 | 96 | 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 |
88 | 98 |
|
89 | 99 | - name: Get current date and time |
90 | 100 | shell: bash |
91 | 101 | id: get_current_date_time |
92 | 102 | 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 |
98 | 104 |
|
99 | 105 | build-service: |
100 | 106 | runs-on: ubuntu-latest |
101 | 107 | needs: [release, define_envs] |
102 | 108 | steps: |
103 | 109 | - name: Get output variables from define_envs job |
104 | 110 | 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" |
106 | 116 |
|
107 | 117 | - name: Define service tags |
108 | 118 | run: | |
@@ -139,7 +149,11 @@ jobs: |
139 | 149 | steps: |
140 | 150 | - name: Get output variables from define_envs job |
141 | 151 | 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" |
143 | 157 |
|
144 | 158 | - name: Define app tags |
145 | 159 | run: | |
|
0 commit comments