Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Replace deprecated set-output command #1940

Merged
merged 3 commits into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,16 @@ jobs:
shell: python
run: |
import json
import os
metadata = json.loads('${{ steps.metadata.outputs.json }}')
version = metadata["labels"]["org.opencontainers.image.version"]
if version == "main":
# get first version that isn't main
for tag in metadata["tags"]:
if ":main" not in tag:
version = tag.split(":")[1]

print(f"::set-output name=version::{version}")
with open(os.environ.get("GITHUB_OUTPUT"), "a") as state:
state.write(f"version={version}\n")

- uses: docker/build-push-action@v3
with:
Expand Down