#github-actions (2022-05)
Discussions related to GitHub Actions
2022-05-09
You can now output and group custom Markdown content on the Actions run summary page.
2022-05-10
GitHub Actions: Beta of Ubuntu 22.04 for GitHub-hosted runners is now available GitHub Actions: Beta of Ubuntu 22.04 for GitHub-hosted runners is now available
GitHub Actions: Beta of Ubuntu 22.04 for GitHub-hosted runners is now available
2022-05-17
Hello Everyone !
I have an issue with running parallel integration tests using docker compose on my hosted runners (DIND)
failed port is already in use
of course I get this error because one PR already triggers the docker-compose and other PRs fail if they run on same node
How do you overcome such an issue do we always need to map 1:1 job and node
I would only do 1:1 job and node from a security perspective
ideally the nodes cycle after each job
you’re running multiple gha runners on the same node under something like systemd?
2022-05-19
2022-05-20
Actions can now run in a Node.js 16 runtime Actions can now run in a Node.js 16 runtime
Actions can now run in a Node.js 16 runtime
2022-05-23
In-between option if GitHub’s workers are too slow but self-managed workers are too much: https://twitter.com/iamvlaaaaaaad/status/1528338181921316866
TIL about @BuildJet: faster managed runners for GitHub Actions!
Don’t want to spend a day setting up your own self-hosted runners on AWS and then worry about the hassle of supporting that?
@BuildJet is super easy, fast, and they take over the maintenance effort https://twitter.com/BuildJet/status/1434891626460196870
Launching BuildJet for Github Actions https://buildjet.com/for-github-actions
- Twice the speed
- Half the price
Make Github Actions faster!
^^^ not sponsored or anything, but I was shocked I did not know about them
2022-05-24
Hi do people here use a recommended approach for setting up deployments to staging and production?
Currently at my company we have a few variations:
Variation 1
• Deploy to staging on push to staging branch
• Deploy to prod on push to master Variation 2
• Deploy to staging on push to master
• Deploy to prod on tagging master Variation 3
• Deploy to staging on workflow_dispatch
• Deploy to production on workflow_dispatch We’re looking to try and encourage everyone to deploy the same way. I quite like “variation 3” as you’re in more control of when things are deployed, plus you can add approvers for production deploys.
We’re looking to try and encourage everyone to deploy the same way
IMO I’d advise you to stick with allowing teams to define their own deployment strategy. I find that trying to reign every project into the same method typically means adding unnecessary steps into the process for smaller projects which means wasted time or worse people just circumventing the process because it’s annoying.
My recommendation would be to define a few workflow templates (by which I mean 2 or 3) then come up with the deployment strategy for each template, clearly define it and then have each project clearly state which template they’re using.
This provides clarity for team members to be able to contribute across multiple projects without being too restrictive.
GitHub Actions: Re-run jobs with debug logging GitHub Actions: Re-run jobs with debug logging
GitHub Actions: Re-run jobs with debug logging
2022-05-31
Does anyone feel like github actions is really slow compared to other CIs? It’s great and all but all my docker builds are running slower in GH Actions.
do you use self-hosted or ubuntu-latest ?
Just ubuntu-latest. Do people commonly go for the self-hosted route?
for private repos, we use self-hosted to save on costs. we leverage self-hosted asg runners and self-hosted eks runners via summerwind action runner controller (ARC)
for public repos, we use ubuntu-latest
however, i personally haven’t noticed an issue with slow builds. Do you mean slow to start ? or slow to complete ?
Slow to complete, in my case just building a docker image. yarn install
and yarn build
is painfully slow. Like 30mins long before it finished CircleCI did it on 5mins
Sorry to bump so late but have you looked into yarn caching? Our heaviest projects take at most a minute after the first run
Example:
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
cd ${{ env.PACKAGE_NAME }}
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
This is more related to the install step alone btw
Yeah i did which speeds it up. But inevitably sometimes the cache does not hit and it’s so painfully slow. I feel like it’s because of the default runners that github uses