GitHub actions - use a custom container registry - github

When using GitHub actions (for example CodeQL code scanning) you can specify a container image in which the action would run, see https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idcontainerimage
In the docs it says:
The Docker image to use as the container to run the action. The value can be the Docker Hub image name or a registry name.
I need to specify an image which resides on a private registry, not in (the public) Docker Hub. The docs seem to suggest it is possible ("or a registry name") but I am not sure if and how I could specify a private image (I refer to the private image in docker as https://my.server.com:1234/dir/image-name:latest).
Is it possible? If yes, how?

I've tested the option that you've mentioned but unfortunately it is not working.
Planning to get support from GitHub to try and figure out if it's possible. (Have a corporate account)

Related

CodeSandbox: Using terminal in node template

I'm trying to create a sandbox using the node template but I'm running into issues accessing the terminal. I have a sandbox here that I've uploaded using their define API which should be using a node template (defined in my sandbox.config.json) and have a defined start script. It shows a 504 and doesn't give me access to the terminal. What am I doing wrong?
After more research: I now see the sandbox running in a node environment, but no terminal - but hovering over the "+" on the upper right of the info/console window gives a tooltip "Fork to add a Terminal". I did so, and the terminal became available. I conclude it's some form of ownership issue - I can't open a terminal in your sandbox, but I can in my forked sandbox.
We can conclude that the define API creates a public template/sandbox - but the terminal is only available in a private sandbox. To use the terminal, you'll have to fork the sandbox after creating it.
(thx to #codesandbox for including the tooltip that led to the conclusion)
That's not a container environment, which is required to have access to a terminal. There are known issues with containers & codesandbox; specifically, you can't convert one sandbox type to another, and sometimes forking from someone else's github also does not create as a container.
Best to start with a containerized template.
In case this helps anyone: to enable containers for an existing project you need to create a sandbox.config.json file with the following content before creating the sandbox:
{
"template": "node"
}
I'm not sure if there is a way to change the sandbox once it's created.
Ref: https://github.com/codesandbox/codesandbox-client/issues/1608

OpenShift RestAPI Equivalent of oc tag

What is the OpenShift RestAPI equivalent of oc tag some.docker.regiery some-image-tag:latest?
From the help page:
Tag existing images into image streams
The tag command allows you to take an existing tag or image from an image stream, or a Docker image pull spec, and set
it as the most recent image for a tag in 1 or more other image streams. It is similar to the 'docker tag' command, but
it operates on image streams instead.
Pass the --insecure flag if your external registry does not have a valid HTTPS certificate, or is only served over HTTP.
Pass --scheduled to have the server regularly check the tag for updates and import the latest version (which can then
trigger builds and deployments). Note that --scheduled is only allowed for Docker images.
Usage:
oc tag [--source=SOURCETYPE] SOURCE DEST [DEST ...] [flags]
Answering my own question for future reference:
Run the command as you would on the cli but add --loglevel=8. (i.e. oc tag some.docker.regiery some-image-tag:latest --loglevel=8).
Then you can see exactly what API call was used and exactly what params were used and you can replicate that! :)

Unable to login to screwdriver.cd via github

Every time I try logging in to https://cd.screwdriver.cd/login I am getting {"statusCode":403,"error":"Forbidden","message":"User github:tannupriyasingh is not allowed access"} error.
I tried adding webhook to Github with steps mentioned here https://developer.github.com/webhooks/creating/ and running into Tunnel 541e163b.ngrok.io not found response
I am expecting to login and create a deployment pipeline in screwdriver-cd.
https://cd.screwdriver.cd is our demo Screwdriver cluster used for deploying open source Screwdriver. We currently do not host any instances for public use. You can login with Guest Access to look at the UI in cd.screwdriver.cd, but you'll need to run your own instance of Screwdriver in order to create a deployment pipeline.
A couple options for running your own instance:
Helm chart: https://docs.screwdriver.cd/cluster-management/helm
Docker compose: https://docs.screwdriver.cd/cluster-management/running-locally

Is there a system location for custom.css searched along with ~/.jupyter/custom/?

For a multiuser JupyterHub server, how do you apply customizations outside of user's home directory, so that it will affect all new users' notebooks ?
I've copied a working stylesheet from ~/.jupyter/custom/custom.css to the following locations with no joy:
/etc/jupyter/custom
/usr/etc/jupyter/custom
/usr/local/etc/jupyter/custom
The hub's job is just to spawn a docker image, so you have to change the actual image, not the hub. The best solution I could think of is either edit your docker image, or if you're using a public image, create a docker image with that public image as the base image. You can then add a simple COPY [/path/to/custom.jss in your host machine] [/path/to/custom.jss in your notebook]. Then if you change your notebook image to this image, it'll overwrite the custom.jss in each new notebook you create.

How can i set a docker action with OpenWhisk in Bluemix?

I was testing OpenWhisk on Bluemix. What i want to do is very very simple. I have a js script that works (it's just a console.log). I have a Dockerfile making a docker .. when i run my docker i can see my console.log \o/ (i know it's amazing)
Then i create my action ......
I try to run it from Bluemix UI
I get this :
failed to invoke action XXX/XXXX: Container hash or name expected in makeContainer.
Just what does it means ? I couldn't find anything on it.
ps : If you know where i can find some real doc about how to use docker container for actions i would be very happy :).
Thanks a lot for your help.
Edit : In the end the problem was that i was trying to pull from a private docker repo. I have to say the error message is not explicit x). Thanks for your help.
You can find the documentation about creating docker actions here: https://new-console.ng.bluemix.net/docs/openwhisk/openwhisk_actions.html#openwhisk_actions_docker
Instructions helps you download the docker sdk for OpenWhisk, and allow you to create a docker action that you can invoke from CLI or Web UI.
If you create the action using the Web UI you need to specify the docker Image from Docker hub using the format username/imagename like openwhisk/example
If you need more help feel free to reach the team on Slack for more real time interactions and we should be able to help you and get your feedback on how can we improve the user experience.
Team: https://developer.ibm.com/open/slack-request
Channel: #openwhisk https://dwopen.slack.com/messages/openwhisk