generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 88
Closed
Description
I found this action because I wanted to use my devcontainer in an Action.
At first this Action seemed like exactly what I needed, but I got stuck with #302.
That led me to realize I should use this Action to build the image:
jobs:
build:
name: Pre-build dev container image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Pre-build dev container image
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/foo/bar
cacheFrom: ghcr.io/foo/bar
push: 'always'But then for actually running steps inside the container you can use jobs.<job_id>.container instead of runCmd:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
container:
image: ghcr.io/foo/bar:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
options: --privileged
steps:
- uses: actions/checkout@v3Note that also allows me to use options: --privileged (for kota65535/github-openvpn-connect-action#40 (comment)).
So, question: Why would someone use runCmd, just to save time?
And if so can the readme / docs clarify that jobs.<job_id>.container is another option.
Metadata
Metadata
Assignees
Labels
No labels