Skip to content

Commit

Permalink
only using 'build' and 'features' to build image
Browse files Browse the repository at this point in the history
  • Loading branch information
rongxin-liu committed Jan 6, 2024
1 parent be7a3c9 commit 6d59e07
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
steps:

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
Expand All @@ -25,6 +25,16 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Remove "customizations" from devcontainer.json via Python3
run: |
pip3 install jsmin
python3 -c "import jsmin, json; f = open('devcontainer.json', 'r'); data = json.loads(jsmin.jsmin(f.read())); o = {}; o['build']=data['build']; o['features']=data['features']; f.close(); f = open('devcontainer.json', 'w'); f.write(json.dumps(o, indent=4)); f.close()"
- name: Build (latest)
if: ${{ github.ref == 'refs/heads/main' }}
Expand Down

0 comments on commit 6d59e07

Please sign in to comment.