|
22 | 22 | - '**' |
23 | 23 | - '!docs/**' |
24 | 24 | merge_group: |
25 | | - types: [checks_requested] |
| 25 | + types: [ checks_requested ] |
26 | 26 |
|
27 | 27 | repository_dispatch: |
28 | 28 | types: [ ci-release ] |
@@ -53,11 +53,10 @@ jobs: |
53 | 53 | outputs: |
54 | 54 | can_publish: ${{ steps.flags.outputs.can_publish }} |
55 | 55 | steps: |
56 | | - - |
57 | | - name: Resolve publish flag |
58 | | - id: flags |
59 | | - shell: bash |
60 | | - run: echo "can_publish=${{ github.repository == 'GitTools/GitVersion' && github.ref_name == 'main' }}" >> "$GITHUB_OUTPUT" |
| 56 | + - name: Resolve publish flag |
| 57 | + id: flags |
| 58 | + shell: bash |
| 59 | + run: echo "can_publish=${{ github.repository == 'GitTools/GitVersion' && github.ref_name == 'main' }}" >> "$GITHUB_OUTPUT" |
61 | 60 |
|
62 | 61 | build: |
63 | 62 | name: Build & Package |
@@ -149,52 +148,50 @@ jobs: |
149 | 148 | GITHUB_TOKEN: ${{ github.token }} |
150 | 149 | CAN_PUBLISH: ${{ github.event_name == 'repository_dispatch' }} |
151 | 150 | steps: |
152 | | - - |
153 | | - name: Checkout |
154 | | - uses: actions/checkout@v6 |
155 | | - with: |
156 | | - fetch-depth: 0 |
157 | | - - |
158 | | - name: Restore State |
159 | | - uses: ./.github/actions/cache-restore |
160 | | - - |
161 | | - name: Restore Artifacts |
162 | | - uses: ./.github/actions/artifacts-restore |
163 | | - - |
164 | | - name: Attestation |
165 | | - if: env.CAN_PUBLISH == 'true' |
166 | | - uses: ./.github/actions/artifacts-attest |
167 | | - - |
168 | | - name: Load DockerHub credentials |
169 | | - id: dockerhub-creds |
170 | | - if: env.CAN_PUBLISH == 'true' |
171 | | - uses: gittools/cicd/dockerhub-creds@v1 |
172 | | - with: |
173 | | - op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |
174 | | - - |
175 | | - name: DockerHub Publish Readme |
176 | | - if: env.CAN_PUBLISH == 'true' |
177 | | - shell: pwsh |
178 | | - run: dotnet run/docker.dll --target=DockerHubReadmePublish |
179 | | - env: |
180 | | - DOCKER_USERNAME: ${{ steps.dockerhub-creds.outputs.docker_username }} |
181 | | - DOCKER_PASSWORD: ${{ steps.dockerhub-creds.outputs.docker_password }} |
182 | | - - |
183 | | - name: '[Release]' |
184 | | - shell: pwsh |
185 | | - run: dotnet run/release.dll --target=PublishRelease |
186 | | - - |
187 | | - name: '[Publish Release]' |
188 | | - if: github.event_name == 'repository_dispatch' |
189 | | - uses: peter-evans/repository-dispatch@v4 |
190 | | - with: |
191 | | - token: ${{ github.token }} |
192 | | - repository: ${{ github.repository }} |
193 | | - event-type: publish-release |
194 | | - client-payload: | |
195 | | - { |
196 | | - "ref": "${{ github.ref }}", |
197 | | - "sha": "${{ github.sha }}", |
198 | | - "tag": "${{ github.event.client_payload.tag }}" |
199 | | - } |
200 | | -
|
| 151 | + - name: Checkout |
| 152 | + uses: actions/checkout@v6 |
| 153 | + with: |
| 154 | + fetch-depth: 0 |
| 155 | + |
| 156 | + - name: Restore State |
| 157 | + uses: ./.github/actions/cache-restore |
| 158 | + |
| 159 | + - name: Restore Artifacts |
| 160 | + uses: ./.github/actions/artifacts-restore |
| 161 | + |
| 162 | + - name: Attestation |
| 163 | + if: env.CAN_PUBLISH == 'true' |
| 164 | + uses: ./.github/actions/artifacts-attest |
| 165 | + |
| 166 | + - name: Load DockerHub credentials |
| 167 | + id: dockerhub-creds |
| 168 | + if: env.CAN_PUBLISH == 'true' |
| 169 | + uses: gittools/cicd/dockerhub-creds@v1 |
| 170 | + with: |
| 171 | + op_service_account_token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} |
| 172 | + |
| 173 | + - name: DockerHub Publish Readme |
| 174 | + if: env.CAN_PUBLISH == 'true' |
| 175 | + shell: pwsh |
| 176 | + run: dotnet run/docker.dll --target=DockerHubReadmePublish |
| 177 | + env: |
| 178 | + DOCKER_USERNAME: ${{ steps.dockerhub-creds.outputs.docker_username }} |
| 179 | + DOCKER_PASSWORD: ${{ steps.dockerhub-creds.outputs.docker_password }} |
| 180 | + |
| 181 | + - name: '[Release]' |
| 182 | + shell: pwsh |
| 183 | + run: dotnet run/release.dll --target=PublishRelease |
| 184 | + |
| 185 | + - name: '[Publish Release]' |
| 186 | + if: github.event_name == 'repository_dispatch' |
| 187 | + uses: peter-evans/repository-dispatch@v4 |
| 188 | + with: |
| 189 | + token: ${{ github.token }} |
| 190 | + repository: ${{ github.repository }} |
| 191 | + event-type: publish-release |
| 192 | + client-payload: | |
| 193 | + { |
| 194 | + "ref": "${{ github.ref }}", |
| 195 | + "sha": "${{ github.sha }}", |
| 196 | + "tag": "${{ github.event.client_payload.tag }}" |
| 197 | + } |
0 commit comments