all github action jobs are queued and never running - github

Updated:
2~3days After, my job is failed automatically with below message
I have some trouble all github action jobs are queued and never executed.
I have checked Github action status on statusgithub.com
but canont find something down or trouble sign.
With many searching, I found this thread
It looks so old trouble. so stranger. on other repository, github action is working well.
yaml
jobs:
never-running-job:
runs-on: node:16.13-alpine3.14
steps:
- uses: actions/checkout#v2
- name: Use Node.js
uses: actions/setup-node#v1
with:
node-version: '14.x'
- name: preinstall
run: yarn install
- name: build app
run: yarn run build
- name: test app
run: yarn run test

Updated
After github action incident on Feb 5, It looks like (even now) not working on many images except 'ubuntu'.
Update runs-on tag to ubuntu latest, I pushed commit then finally github picks my ci/cd jobs.
I used node alpine image originally
old answers
I found incidents in github page when I faced that error.
Maybe that affects queued status.

I think I had a typo... But basically I changed this line
runs-on: ubuntu-latest -
to
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
And now it works.

Related

Github workflows action continuous deployment not working

I want to setup continuous deployment pipeline between Github and AWS Lambda. For this, I've added main.yml file # myrepo/.github/workflows/main.yml
This is my main.yml file
name: deploy to lambda
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
jobs:
deploy_source:
name: deploy lambda from source
runs-on: ubuntu-latest
steps:
- name: checkout source code
uses: actions/checkout#v1
- name: default deploy
uses: appleboy/lambda-action#master
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_region: ${{ secrets.AWS_REGION }}
function_name: my_function
source: function.py
Now when I push changes to main branch nothing happens. It shows There are no workflow runs yet. I have checked the function_name and it is same as the function in AWS Console.
Your deploy_source job has runs-on: ubuntu-latest which tells Actions to use a GitHub Hosted Runner. As per your comment, you are using GitHub Enterprise Server (GHES) which is a virtual appliance on your company's network. At present, GHES does not support using GitHub Hosted Runners (it's worth noting at the time of this writing, it is on the product roadmap for support).
If you wish to run your workflow, you will need to make use of a self-hosted hosted runner. I would recommend working with your GHES administrator to get this workflow to run as there are potentially other settings and/or steps that may need to be modified or taken for this to work.
As tj-cappelletti said in their answer, you should use your hosted runners.
And also, be sure that your pipeline is on your default branch. Otherwise, you wouldn't see it there.
You need to place workflows in .github/workflows/. Note the dot in front of the folder name .github. So for your case the final path should look like this myrepo/.github/workflows/main.yml.

Deployment with custom Github Actions workflow for jekyll site

I've tried to deploy a Jekyll blog site with my custom Github Actions workflow file. Build and deployment have succeeded so far.
But every time I push the sources to this git repository, the GitHub Pages bot action is executed as well. So two workflow files are executed after pushing.
I've switched the 'Build and Deployment' setting from 'deploy from branch' to 'Github Actions'. After I've done it, my custom GitHub Actions are executed only. But the changes have not been deployed to my github.io blog site.
My question is do I have to use the GitHub Pages bot action, if not,
Is there any solution to my workflow file?
name: build site with jekyll and deploy on github pages
on:
push:
branches:
- master
jobs:
jekyll:
runs-on: ubuntu-20.04
steps:
# checkout code
- uses: actions/checkout#v2
# Use ruby/setup-ruby to shorten build times
# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby#v1
with:
ruby-version: 3.1 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# use jekyll-action-ts to build
# https://github.com/limjh16/jekyll-action-ts
- uses: limjh16/jekyll-action-ts#v2
with:
enable_cache: true
# use actions-gh-pages to deploy
# https://github.com/peaceiris/actions-gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages#v3
with:
# GITHUB_TOKEN secret is set up automatically
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site

Propagating or setting up GitHub Classroom Workflow

I'm experimenting with setting up GitHub Classroom (after getting really tired of manually running tests for student submissions this term). I picked one of the tests from the class I am just finishing, but for the test script I have there, I need Python 3.10; earlier versions won't do.
I tried setting up .github/workflows/classroom.yml to specify the Python version. If I set it to this, in a student repository, I can get my tests to run:
name: GitHub Classroom Workflow
on: [push]
jobs:
build:
name: Autograding
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python#v2
with:
python-version: "3.10"
- uses: actions/checkout#v2
- uses: education/autograding#v1
but (of course) I don't want my students to do this manually whenever they check out an assignment. So, I tried adding the same to the template repository, but that doesn't seem to affect the student repository when I make a new one of those. There, I get the default I got before
name: GitHub Classroom Workflow
on: [push]
jobs:
build:
name: Autograding
runs-on: ubuntu-latest
steps:
- uses: actions/checkout#v2
- uses: education/autograding#v1
Is there a way to specify what the workflow should be for an assignment or classroom? Or a way to get it from the template?
Or a way to get it from the template?
Your template could include a workflow, meaning reuse an existing workflow (possible since Oct. 2021)
The "Reusable workflows and workflow templates" section includes:
Inside workflow templates, you can also reference reusable workflows to make it easy for people to benefit from reusing centrally managed workflow code.
If your reusable workflow comes with the right python-version, nothing will have to be set up manually.

Is there a way to send a completed build from a GitHub Action to a release?

I would like to push a build that was completed on a GitHub action workflow using this code:
name: Build
on: [pull_request, push]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout the code
uses: actions/checkout#v2
- name: Build the app
run: ./gradlew build
Currently this works for building the app and updating a status badge, but I would like the apk file from this build to be pushed directly as a pre-release. Is this possible?
Yes, it is possible.
If you want to make a GitHub release containing the file, there are a lot of GitHub actions. This action - automatic-releases, I think can do the work for you.
This action simplifies the GitHub release process by automatically uploading assets, generating changelogs, handling pre-releases, and so on.
As I see you use Gradle, you can check the GitHub docs for publishing-java-packages-with-gradle

Using GitHub actions like GitLab CI/CD

I just started to migrate all my GitLab repositories to GitHub. I wasn't using GitHub for a while so I stumbled over the - at least for me new feature - GitHub Actions.
Since I just started a new project, I wanted to use GitHub Actions for build and deploy my new application. I've really no idea what I'm doing wrong, I'll attach my workflow file below.
What I want to achieve is, everytime I push to a branch that's not my master and that hasn't the prefix 'release/', I want to execute this build and deploy for my development system. Later I will also setup the same script but for a staging (pre production) system ONLY if I push into a branch with the prefix 'release/' and indeed the same a thrid time for production for the master branch only.
What I'm wondering about is, the actions get - at least for my understanding - executed sporadically. I want an behaviour like I had in GitLab: Everytime I push a feature branch or whatever from my local working machine, the development pipeline should get executed. Then I'll create a pull request. Only if the pipeline was successful, I want to be able to merge. After the merge into a branch (for example feature/... into develop), I would like to automatically execute the pipeline for development.
I'm not even sure if this is possible. Maybe I also didn't understood the concept of actions correctly.
name: Publish Development
on:
push:
branches:
- '**'
- '!master'
- '!release/**'
pull_request:
branches:
- '**'
- '!master'
- '!release/**'
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: check out repository
uses: actions/checkout#v2
with:
token: ${{ secrets.PRIVATE_ACCESS_TOKEN}}
- name: install dependencies
run: npm install
- name: install dependencies
run: npm --prefix ./functions install ./functions
- name: deploy to firebase
uses: w9jds/firebase-action#master
with:
args: deploy
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
Thanks!
EDIT: Well it turned out that I just started to try new technology during some service interruption. GitHub was experiencing some issues in their infrastructure. Its working now as expected.
Well it turned out that I just started to try new technology during some service interruption. GitHub was experiencing some issues in their infrastructure. Its working now as expected.