Skip to content

Commit 96cd791

Browse files
author
Victor M. Varela
committed
ci: devcontainer +act
1 parent de7a518 commit 96cd791

File tree

3 files changed

+25
-14
lines changed

3 files changed

+25
-14
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ RUN apk update && apk add --no-cache \
1313
make \
1414
nodejs \
1515
npm \
16+
oh-my-zsh \
1617
openssh \
1718
pre-commit \
1819
py3-pip \
1920
unzip \
20-
&& rm -rf /var/cache/apk/*
21+
&& rm -rf /var/cache/apk/* \
22+
&& cp /usr/share/oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
2123

2224
# Establecer directorio de trabajo
2325
WORKDIR /workspace

.devcontainer/devcontainer.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,19 @@
1313
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.config,target=/root/.config,type=bind,consistency=cached"
1414
],
1515
"features": {
16-
"ghcr.io/cirolosapio/devcontainers-features/alpine-docker-outside-of-docker:0": {}
16+
"ghcr.io/cirolosapio/devcontainers-features/alpine-docker-outside-of-docker:0": {},
17+
"ghcr.io/devcontainers-extra/features/act:1": {}
18+
},
19+
"customizations": {
20+
"vscode": {
21+
"settings": {
22+
"terminal.integrated.defaultProfile.linux": "zsh"
23+
},
24+
"extensions": [
25+
"ms-azuretools.vscode-docker",
26+
"github.vscode-github-actions",
27+
"GitHub.vscode-pull-request-github"
28+
]
29+
}
1730
}
1831
}

.github/workflows/devcontainer.yaml-disabled renamed to .github/workflows/devcontainer.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@ name: Dev-Container
22

33
on:
44
workflow_dispatch:
5-
pull_request:
6-
branches:
7-
- master
8-
paths:
9-
- .devcontainer/**/*
10-
push:
11-
branches:
12-
- master
13-
paths:
14-
- .devcontainer/**/*
5+
inputs:
6+
push:
7+
description: 'Push the container'
8+
required: true
9+
default: 'false'
10+
type: boolean
1511

1612
jobs:
1713
docker:
18-
name: Docker ${{ github.event_name == 'push' && 'Push' || 'Build' }}
14+
name: Docker ${{ inputs.push && 'Push' || 'Build' }}
1915
runs-on: ubuntu-latest
2016
permissions:
2117
contents: read
@@ -37,5 +33,5 @@ jobs:
3733
run: docker build --tag ghcr.io/${{ github.repository }}:devcontainer .devcontainer
3834

3935
- name: Push
40-
if: ${{ github.event_name == 'push' }}
36+
if: ${{ inputs.push }}
4137
run: docker push ghcr.io/${{ github.repository }}:devcontainer

0 commit comments

Comments
 (0)