mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-21 23:45:16 -05:00
.github/workflows/docker.yml: remove deprecated set-output
https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
This commit is contained in:
parent
d33dad9f89
commit
98642c099d
18
.github/workflows/docker.yml
vendored
18
.github/workflows/docker.yml
vendored
@ -29,8 +29,8 @@ jobs:
|
||||
run: |
|
||||
IMAGE_ID=${GITHUB_REPOSITORY,,}
|
||||
IMAGE_NAME=${IMAGE_ID#*/}
|
||||
echo ::set-output name=image_id::$IMAGE_ID
|
||||
echo ::set-output name=image_name::$IMAGE_NAME
|
||||
echo "image_id=$IMAGE_ID" >> $GITHUB_ENV
|
||||
echo "image_name=$IMAGE_NAME" >> $GITHUB_ENV
|
||||
docker build . --file Dockerfile -t $IMAGE_NAME
|
||||
|
||||
- name: Login to Github Container Registry
|
||||
@ -43,10 +43,10 @@ jobs:
|
||||
- name: Tag image
|
||||
id: tag_image
|
||||
run: |
|
||||
IMAGE_NAME=${{ steps.build_image.outputs.image_name }}
|
||||
IMAGE_ID=ghcr.io/${{ steps.build_image.outputs.image_id }}
|
||||
IMAGE_NAME=${{ env.image_name }}
|
||||
IMAGE_ID=ghcr.io/${{ env.image_id }}
|
||||
echo IMAGE_ID=$IMAGE_ID
|
||||
echo ::set-output name=image_id::$IMAGE_ID
|
||||
echo "image_id=$IMAGE_ID" >> $GITHUB_ENV
|
||||
|
||||
# Strip git ref prefix from version
|
||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||
@ -55,7 +55,7 @@ jobs:
|
||||
# if version is master, set version to dev
|
||||
[[ "$VERSION" == "master" ]] && VERSION=dev
|
||||
echo VERSION=$VERSION
|
||||
echo ::set-output name=version::$VERSION
|
||||
echo "version=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
# tag dev or x.x.x
|
||||
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
|
||||
@ -64,8 +64,8 @@ jobs:
|
||||
|
||||
- name: Push images to registry
|
||||
run: |
|
||||
VERSION=${{ steps.tag_image.outputs.version }}
|
||||
IMAGE_ID=${{ steps.tag_image.outputs.image_id }}
|
||||
VERSION=${{ env.version }}
|
||||
IMAGE_ID=${{ env.image_id }}
|
||||
|
||||
[[ "$VERSION" != "dev" ]] && docker push $IMAGE_ID:latest || true
|
||||
docker push $IMAGE_ID:$VERSION
|
||||
@ -77,4 +77,4 @@ jobs:
|
||||
url: ${{ secrets.DEPLOY_URL }}
|
||||
method: POST
|
||||
headers: '{"Authentication": "Token ${{ secrets.DEPLOY_TOKEN }}"}'
|
||||
payload: '{"version": "${{ steps.tag_image.outputs.version }}"}'
|
||||
payload: '{"version": "${{ env.version }}"}'
|
||||
|
Loading…
Reference in New Issue
Block a user