Introduce gitea-actions to automatically build this container #8
30
.gitea/workflows/release-tag.yml
Normal file
30
.gitea/workflows/release-tag.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
name: build-docker-imge
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build the docker container
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Print env"
|
||||
run: echo WORKSPACE
|
||||
- name: "Git clone"
|
||||
run: git clone ${{ gitea.server_url }}/${{ gitea.repository }}.git .
|
||||
- name: "LS"
|
||||
run: ls -lisa
|
||||
- name: "LS ECHO"
|
||||
run: echo "$(ls)" "${{ gitea.repository }}" "${{ gitea.ref_name }}" "${{ gitea.sha }}"
|
||||
- name: "Git checkout"
|
||||
run: git checkout "${{ gitea.sha }}"
|
||||
- uses: aevea/action-kaniko@master
|
||||
name: Run Kaniko to build our docker container.
|
||||
with:
|
||||
image: kocoded/gitea-workspaces/ubuntu-vscode-node
|
||||
tag: ${{ gitea.workflow_sha }}
|
||||
tag_with_latest: true
|
||||
registry: git.kocoder.xyz
|
||||
username: ${{ secrets.CI_RUNNER_USER }}
|
||||
password: ${{ secrets.CI_RUNNER_TOKEN }}
|
||||
build_file: ubuntu-vscode-node/Dockerfile
|
|
@ -20,7 +20,7 @@ RUN useradd -ms /bin/bash kocoded-workspaces -p "$(openssl passwd -1 ubuntu)"
|
|||
RUN usermod -aG sudo kocoded-workspaces
|
||||
RUN systemctl enable code-server@kocoded-workspaces
|
||||
|
||||
COPY vscode-config.yaml /home/kocoded-workspaces/.config/code-server/config.yaml
|
||||
COPY ubuntu-vscode-node/vscode-config.yaml /home/kocoded-workspaces/.config/code-server/config.yaml
|
||||
RUN chown -R kocoded-workspaces /home/kocoded-workspaces
|
||||
|
||||
EXPOSE 22
|
||||
|
|
Loading…
Reference in New Issue
Block a user