Skip to content

Commit

Permalink
Run devcontainer on CI but only push from branch
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsso committed Jan 15, 2024
1 parent 356a467 commit 2f35c9e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/devcontainer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Prepare Env
id: prepare
run: |
([[ ${{ github.event_name == 'pull_request' }} == true ]] && echo "push=never" || echo "push=filter" ) >> $GITHUB_OUTPUT
- name: Pre-build dev container image
uses: devcontainers/ci@v0.3
with:
imageName: ghcr.io/nodlecode/devcontainer-chain
cacheFrom: ghcr.io/nodlecode/devcontainer-chain
push: ${{ github.event_name != 'pull_request' }}
push: ${{ steps.prepare.outputs.push }}

0 comments on commit 2f35c9e

Please sign in to comment.