mirror of
https://github.com/Gradiant/5g-images.git
synced 2025-11-02 04:53:13 +00:00
Fix set-output command deprecated in gh actions
This commit is contained in:
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
id: generate-matrix
|
||||
run: |
|
||||
changed=`echo "${{ steps.files.outputs.all_changed_files }}" | sed 's/ /\n/g' | grep $images_dir | cut -f2 -d'/' | uniq | sed 's/^/"/;s/$/"/' | sed -z 's/\n/,/g;s/,$/\n/'`
|
||||
echo "::set-output name=matrix::{ \"image\": [ ${changed} ] }"
|
||||
echo "matrix={ \"image\": [ ${changed} ] }" >> $GITHUB_OUTPUT
|
||||
|
||||
# build image if changes in code
|
||||
build-image:
|
||||
@@ -45,9 +45,9 @@ jobs:
|
||||
id: image-info
|
||||
run: |
|
||||
source ./images/${{ matrix.image }}/image_info.sh
|
||||
echo "::set-output name=platforms::$PLATFORMS"
|
||||
echo "::set-output name=image_tag::$IMAGE_TAG"
|
||||
echo "::set-output name=image::${{ matrix.image }}"
|
||||
echo "platforms=$PLATFORMS" >> $GITHUB_OUTPUT
|
||||
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
||||
echo "image=${{ matrix.image }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
7
.github/workflows/cron.yml
vendored
7
.github/workflows/cron.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
id: generate-matrix
|
||||
run: |
|
||||
IMAGES=$( ls -1 ${{ env.IMAGES_DIR }} | tr '\n' ',' | sed 's/[^,]\+/"\0"/g;s/,$//' )
|
||||
echo "::set-output name=matrix::{ \"image\": [ ${IMAGES} ] }"
|
||||
echo "matrix={ \"image\": [ ${IMAGES} ] }" >> $GITHUB_OUTPUT
|
||||
# ---
|
||||
|
||||
# Update the version of the existing images when possible and launch pull request
|
||||
@@ -46,11 +46,10 @@ jobs:
|
||||
id: update_tag
|
||||
run: |
|
||||
cd ${{ env.IMAGE_DIR }}
|
||||
echo "::set-output name=old-version::$( sed -n '/IMAGE_TAG/s/^.*=//p' image_info.sh || echo 'NOT_FOUND' )"
|
||||
echo "old-version=$( sed -n '/IMAGE_TAG/s/^.*=//p' image_info.sh || echo 'NOT_FOUND' )" >> $GITHUB_OUTPUT
|
||||
|
||||
[[ -f ./update_current_tag.sh ]] && ./update_current_tag.sh
|
||||
|
||||
echo "::set-output name=new-version::$( sed -n '/IMAGE_TAG/s/^.*=//p' image_info.sh || echo 'NOT_FOUND' )"
|
||||
echo "new-version=$( sed -n '/IMAGE_TAG/s/^.*=//p' image_info.sh || echo 'NOT_FOUND' )" >> $GITHUB_OUTPUT
|
||||
continue-on-error: true
|
||||
|
||||
# Launch Pull Request only when the version is updated
|
||||
|
||||
8
.github/workflows/push.yml
vendored
8
.github/workflows/push.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
||||
id: generate-matrix
|
||||
run: |
|
||||
changed=`echo "${{ steps.files.outputs.all_changed_files }}" | sed 's/ /\n/g' | grep $images_dir | cut -f2 -d'/' | uniq | sed 's/^/"/;s/$/"/' | sed -z 's/\n/,/g;s/,$/\n/'`
|
||||
echo "::set-output name=matrix::{ \"image\": [ ${changed} ] }"
|
||||
echo "matrix={ \"image\": [ ${changed} ] }" >> $GITHUB_OUTPUT
|
||||
|
||||
# build image if changes in code
|
||||
build-image:
|
||||
@@ -46,9 +46,9 @@ jobs:
|
||||
id: image-info
|
||||
run: |
|
||||
source ./images/${{ matrix.image }}/image_info.sh
|
||||
echo "::set-output name=platforms::$PLATFORMS"
|
||||
echo "::set-output name=image_tag::$IMAGE_TAG"
|
||||
echo "::set-output name=image::${{ matrix.image }}"
|
||||
echo "platforms=$PLATFORMS" >> $GITHUB_OUTPUT
|
||||
echo "image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
|
||||
echo "image=${{ matrix.image }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
Reference in New Issue
Block a user