dawidd6 / action-ansible-playbook

:gear: A GitHub Action for running Ansible playbooks
MIT License
306 stars 68 forks source link

save-state command is depreciated warning #63

Closed clincha closed 2 years ago

clincha commented 2 years ago

Warning: The save-state 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/

dawidd6 commented 2 years ago

Where do you see that?

I can't find it in latest workflow run here https://github.com/dawidd6/action-ansible-playbook/actions/runs/3298314971

clincha commented 2 years ago

It's flagging a couple of times during the requirements install on my runs:

Run dawidd6/action-ansible-playbook@v2.6.0
Warning: The `save-state` 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/
/bin/ansible-galaxy role install -r galaxy-requirements.yml
- monolithprojects.github_actions_runner (1.[16](https://github.com/clincha/clinch-home/actions/runs/3440492965/jobs/5739022005#step:3:17).0) is already installed, skipping.
/bin/ansible-galaxy collection install -r galaxy-requirements.yml
Process install dependency map
|/-\|/-Starting collection install process
|Skipping 'community.general' as it is already installed
Warning: The `save-state` 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/
/bin/ansible-playbook site.yml --inventory edinburgh.proxmox.yml --key-file .ansible_key

I'm guessing it's coming from main.js where it's using savestate (line 28/48) but that's odd because the version this action is using is 1.10.0 which is what the documentation recommends. This is the relevant part of my workflow by the way:

- name: ansible-playbook
  uses: dawidd6/action-ansible-playbook@v2.6.0
  with:
    playbook: site.yml
    directory: Ansible
    key: ${{ secrets.ANSIBLE_PK }}
    requirements: galaxy-requirements.yml
    options: |
      --inventory edinburgh.proxmox.yml

I'll be able to dig into this more after new year but I'm just focusing on other stuff right now

clincha commented 2 years ago

Don't worry I'm being an idiot. The new tag fixes the issue. Upgrade to version 2.6.1 fixed it