Skip to content

Commit

Permalink
support object initializeCommand (#12)
Browse files Browse the repository at this point in the history
* try removing current workaround

* will runCmd let action use devcontainer up?

* how about this

* oh

* fix
  • Loading branch information
sarisia authored Jan 29, 2024
1 parent ac3b1cf commit 28effe5
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/update-devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ github.token }}

- name: run initializeCommand
# temporary workaround. See https://github.com/devcontainers/cli/issues/190
- name: actual build
# use devcontainer up instead of devcontainer build. See https://github.com/devcontainers/cli/issues/190
run: |
set -e
npm install -g @devcontainers/cli
initializeCommand=`devcontainer read-configuration --workspace-folder "${{ inputs.directory }}" | jq --raw-output .configuration.initializeCommand`
if [[ $initializeCommand != 'null' ]]; then
echo "about to execute $initializeCommand"
eval "$initializeCommand"
fi
devcontainer up --workspace-folder ${{ inputs.directory }} --prebuild --build-no-cache --skip-post-create
- uses: devcontainers/ci@c3e31cc561800ac318ed000e22ffc6713c93d009
- name: upload image
uses: devcontainers/ci@c3e31cc561800ac318ed000e22ffc6713c93d009
with:
imageName: ${{ inputs.image-name }}
subFolder: ${{ inputs.directory }}
push: ${{ inputs.push }}
noCache: true

0 comments on commit 28effe5

Please sign in to comment.