Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI away from deprecated save-state and set-output #1015

Open
dshemetov opened this issue Oct 31, 2022 · 2 comments
Open

Update CI away from deprecated save-state and set-output #1015

dshemetov opened this issue Oct 31, 2022 · 2 comments
Assignees
Labels
chore code health readability, maintainability, best practices, etc help wanted

Comments

@dshemetov
Copy link
Contributor

dshemetov commented Oct 31, 2022

See context and a simple fix here. This comes up when building images. (See "Resolve Tag" in this build.)

Run baseRef="${GITHUB_REF#*/}"
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-[10](https://github.com/cmu-delphi/delphi-epidata/actions/runs/3364623430/jobs/5579258952#step:5:11)-11-github-actions-deprecating-save-state-and-set-output-commands/
Warning: The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Have until June 2023 to do this.

@dshemetov dshemetov added the code health readability, maintainability, best practices, etc label Nov 2, 2022
@dmytrotsko
Copy link
Contributor

example how this was done for forcast-eval repo

@BrainIsDead BrainIsDead self-assigned this Aug 15, 2023
BrainIsDead added a commit that referenced this issue Aug 21, 2023
melange396 pushed a commit that referenced this issue Aug 21, 2023
* The changes made in this commit include:
- Updated the version of the `actions/checkout` action from `v2` to `v3` in the `.github/workflows/ci.yaml` file.
- Modified the checkout step for multiple repositories to use the `actions/checkout@v3` action.
- Updated the checkout step for the `src/client/packaging/npm` directory to use the `actions/checkout@v3` action.
- Updated the checkout step for the code in the `jobs.build` section to use the `actions/checkout@v3` action.
- Added a step to set the output variables `tag` and `repo` in the `jobs.build` section.

These changes update the workflow to use the latest version of the `actions/checkout` action and ensure that the code is checked out correctly for each repository.

* The changes made in this commit include:
- Updated the version of the `actions/checkout` action from `v2` to `v3` in the `.github/workflows/create-release.yml`, `.github/workflows/missing_signals.yaml`, `.github/workflows/release-helper.yml`, and `.github/workflows/update_gdocs_data.yml` files.
- Updated the version of the `actions/setup-python` action from `v2` to `v4` in the `.github/workflows/create-release.yml`, `.github/workflows/missing_signals.yaml`, `.github/workflows/release-helper.yml`, and `.github/workflows/update_gdocs_data.yml` files.
- Removed the line `echo -n "::set-output name=next_tag::"` and replaced it with `echo -n $next_tag >> $GITHUB_OUTPUT` in the `.github/workflows/create-release.yml` file.
- Removed the line `echo -n "::set-output name=version::"` and replaced it with `echo -n $version >> $GITHUB_OUTPUT` in the `.github/workflows/release-helper.yml` file.

* The changes made in this commit include:
- Added `.github/workflows/create-release.yml`
- Modified `.github/workflows/create-release.yml` to update the `echo -n $next_tag` line to `echo -n "next_tag={next_tag}" >> $GITHUB_OUTPUT`
- Modified `.github/workflows/release-helper.yml` to update the `echo -n $version` line to `echo -n "version={version}" >> $GITHUB_OUTPUT`
melange396 added a commit that referenced this issue Aug 21, 2023
@melange396 melange396 assigned rzats and unassigned BrainIsDead May 29, 2024
@melange396
Copy link
Collaborator

recent changes have removed save-state but there is still some set-output used in:

echo "::set-output name=tag::$imageTag"
echo "::set-output name=repo::ghcr.io/${{ github.repository }}"
- name: Push Dev Tag
run: |
docker tag repo ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
docker push ${{ steps.tagname.outputs.repo }}:${{ steps.tagname.outputs.tag }}
# - name: Extract version
# if: startsWith(github.ref, 'refs/heads/main')
# id: extract_version
# run: node -pe "'::set-output name=version::' + require('./package.json').version"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore code health readability, maintainability, best practices, etc help wanted
Projects
None yet
Development

No branches or pull requests

6 participants