workflows/build-ci-container-windows: Remove template expansion#200097
Merged
Conversation
https://github.com/llvm/llvm-project/security/code-scanning/1580 https://github.com/llvm/llvm-project/security/code-scanning/1581 https://github.com/llvm/llvm-project/security/code-scanning/1582 https://github.com/llvm/llvm-project/security/code-scanning/1583 https://github.com/llvm/llvm-project/security/code-scanning/1584 https://github.com/llvm/llvm-project/security/code-scanning/1585 https://github.com/llvm/llvm-project/security/code-scanning/1586 https://github.com/llvm/llvm-project/security/code-scanning/1587
|
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) Changeshttps://github.com/llvm/llvm-project/security/code-scanning/1580 https://github.com/llvm/llvm-project/security/code-scanning/1581 https://github.com/llvm/llvm-project/security/code-scanning/1582 https://github.com/llvm/llvm-project/security/code-scanning/1583 https://github.com/llvm/llvm-project/security/code-scanning/1584 https://github.com/llvm/llvm-project/security/code-scanning/1585 https://github.com/llvm/llvm-project/security/code-scanning/1586 https://github.com/llvm/llvm-project/security/code-scanning/1587 Full diff: https://github.com/llvm/llvm-project/pull/200097.diff 1 Files Affected:
diff --git a/.github/workflows/build-ci-container-windows.yml b/.github/workflows/build-ci-container-windows.yml
index 461385810f2f8..4221562e2da68 100644
--- a/.github/workflows/build-ci-container-windows.yml
+++ b/.github/workflows/build-ci-container-windows.yml
@@ -39,11 +39,16 @@ jobs:
echo "container-filename=ci-windows-${tag}.tar" >> $env:GITHUB_OUTPUT
- name: Build Container
working-directory: .github/workflows/containers/github-action-ci-windows
+ env:
+ CONTAINER_NAME_TAG: ${{ steps.vars.outputs.container-name-tag }}
run: |
- docker build -t ${{ steps.vars.outputs.container-name-tag }} .
+ docker build -t $env:CONTAINER_NAME_TAG .
- name: Save container image
+ env:
+ CONTAINER_NAME_TAG: ${{ steps.vars.outputs.container-name-tag }}
+ CONTAINER_FILENAME: ${{ steps.vars.outputs.container-filename }}
run: |
- docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
+ docker save $env:CONTAINER_NAME_TAG > $env:CONTAINER_FILENAME
- name: Upload container image
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
@@ -66,13 +71,17 @@ jobs:
with:
name: container
- name: Push Container
+ env:
+ CONTAINER_FILENAME: ${{ needs.build-ci-container-windows.outputs.container-filename }}
+ CONTAINER_NAME_TAG: ${{ needs.build-ci-container-windows.outputs.container-name-tag }}
+ CONTAINER_NAME: ${{ needs.build-ci-container-windows.outputs.container-name }}
run: |
sudo apt-get update
sudo apt-get install -y skopeo
- skopeo login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
- skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \
+ skopeo login -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }} ghcr.io
+ skopeo copy docker-archive:$CONTAINER_FILENAME \
--dest-compress-format zstd \
- docker://${{ needs.build-ci-container-windows.outputs.container-name-tag }}
- skopeo copy docker-archive:${{ needs.build-ci-container-windows.outputs.container-filename }} \
+ docker://$CONTAINER_NAME_TAG
+ skopeo copy docker-archive:$CONTAINER_FILENAME \
--dest-compress-format zstd \
- docker://${{ needs.build-ci-container-windows.outputs.container-name }}:latest
+ docker://$CONTAINER_NAME:latest
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://github.com/llvm/llvm-project/security/code-scanning/1580 https://github.com/llvm/llvm-project/security/code-scanning/1581 https://github.com/llvm/llvm-project/security/code-scanning/1582 https://github.com/llvm/llvm-project/security/code-scanning/1583 https://github.com/llvm/llvm-project/security/code-scanning/1584 https://github.com/llvm/llvm-project/security/code-scanning/1585 https://github.com/llvm/llvm-project/security/code-scanning/1586 https://github.com/llvm/llvm-project/security/code-scanning/1587