Introduce gitea-actions to automatically build this container #8

Merged
Kocoder merged 47 commits from gitea-actions into main 2024-08-04 21:06:54 +00:00
Showing only changes of commit da6ee07762 - Show all commits

View File

@@ -6,7 +6,7 @@ on:
jobs:
build:
name: Build the docker container
runs-on: docker:latest
runs-on: ubuntu?latest
steps:
- name: "Print env"
run: echo WORKSPACE ${{ GITEA_WORKSPACE }} REPO ${{ GITEA_REPOSITORY }} REF ${{ GITEA_REF }}
@@ -15,9 +15,15 @@ jobs:
- name: "Git switch"
run: git checkout ${{ GITEA_REF }}
- name: "pwd"
run: "[ -e /var/run/docker.sock ] && echo exists || echo does not exist"
- uses: docker/setup-buildx-action@v3
name: Setup docker buildx
- run: docker build . -t git.kocoder.xyz/kocoded/gitea-workspaces:${{ var.GITEA_SHA }}
name: Build the docker container
- run: docker push git.kocoder.xyz/kocoded/gitea-workspaces:${{ var.GITEA_SHA }}
run: |
"[ -e /var/run/docker.sock ] && echo exists || echo does not exist"
"cd ubuntu-vscode-node"
- uses: aevea/action/kaniko@master
name: Run Kaniko to build our docker container.
with:
image: kocoded/gitea-workspaces/ubuntu-vscode-node
tag: ${{ GITEA_REF }}
tag_with_latest: true
registry: git.kocoder.xyz
username: ${{ GITEA_ACTOR }}
password: ${{ GITEA_TOKEN }}