Clear cache in GitHub Actions

Update (October 20, 2022) You can now manage caches via the UI: https://github.com/<OWNER>/<REPO>/actions/caches Update (June 27, 2022) You can now manage caches via the GitHub Actions Cache API: GET list of caches for a repository: $ curl \ -H “Accept: application/vnd.github.v3+json” \ -H “Authorization: token <TOKEN>” \ https://api.github.com/repos/OWNER/REPO/actions/caches DELETE cache for a repository using a … Read more

Using output from a previous job in a new one in a GitHub Action

Check the “GitHub Actions: New workflow features” from April 2020, which could help in your case (to reference step outputs from previous jobs) Job outputs You can specify a set of outputs that you want to pass to subsequent jobs and then access those values from your needs context. See documentation: jobs.<jobs_id>.outputs A map of … Read more

In a github actions workflow, is there a way to have multiple jobs reuse the same setup?

As of today (August 2021) composite action is no longer limited to run. GitHub Actions: Reduce duplication with action composition name: “Publish to Docker” description: “Pushes built artifacts to Docker” inputs: registry_username: description: “Username for image registry” required: true registry_password: description: “Password for image registry” required: true runs: using: “composite” steps: – uses: docker/setup-buildx-action@v1 – … Read more

The unauthenticated git protocol on port 9418 is no longer supported

First, this error message is indeed expected on Jan. 11th, 2022. See “Improving Git protocol security on GitHub”. January 11, 2022 Final brownout. This is the full brownout period where we’ll temporarily stop accepting the deprecated key and signature types, ciphers, and MACs, and the unencrypted Git protocol. This will help clients discover any lingering … Read more

Github Actions – trigger another action after one action is completed

There are 2 options of doing this: Use a second job inside the same workflow.yml together with the needs keyword Create a separate notify.yml workflow that uses the workflow_run event as a trigger 1. Same workflow, separate job with needs keyword In your workflow.yml file you simply define two jobs like this (leveraging the needs: … Read more

Get the current pushed tag in Github Actions

As far as I know there is no tag variable. However, it can be extracted from GITHUB_REF which contains the checked out ref, e.g. refs/tags/v1.2.3 Try this workflow. It creates a new environment variable with the extracted version that you can use in later steps. on: push: tags: – ‘v*.*.*’ jobs: test: runs-on: ubuntu-latest steps: … Read more

How to run multiple commands in one Github Actions Docker

You can run multiple commands using a pipe | on the run attribute. Check this out: name: My Workflow on: [push] jobs: runMultipleCommands: runs-on: ubuntu-latest steps: – uses: actions/checkout@v1 – run: | echo “A initial message” pip install -r requirements.txt echo “Another message or command” python myscript.py bash some-shell-script-file.sh -xe – run: echo “One last … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)