-
Notifications
You must be signed in to change notification settings - Fork 6
47 lines (39 loc) · 1.21 KB
/
devcontainer-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Build Dev Container Image
on:
push:
branches: [ dev-env ]
env:
REGISTRY: ghcr.io
jobs:
build:
name: Build and Push Docker image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: true
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Prepare devcontainer config
run: |
npm i -g strip-json-comments-cli
sudo apt-get install -y jq
echo "$(strip-json-comments .devcontainer/devcontainer.json | jq '.dockerComposeFile[1]="docker-compose.build.yml"')" > .devcontainer/devcontainer.json
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
uses: docker/build-push-action@v2
with:
context: ./.devcontainer
push: true
tags: ghcr.io/0xffff-one/flarum-0x-devcontainer:latest