Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
contents: read
deployments: none
issues: none
packages: none
packages: write
pull-requests: none
repository-projects: none
security-events: none
Expand Down Expand Up @@ -166,10 +166,36 @@ jobs:

build:
runs-on: ubuntu-20.04
if: github.ref != 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "~1.20"
- name: build image
run: make -j build/image/envbox
publish:
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/main'
steps:
- name: Docker Login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v3

- uses: actions/setup-go@v3
with:
go-version: "~1.20"

- name: build image
run: make -j build/image/envbox

- name: tag image
run: docker tag envbox ghcr.io/coder/envbox:latest

- name: push image
run: docker push ghcr.io/coder/envbox:latest
6 changes: 6 additions & 0 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ FROM ubuntu:focal
# Copy configuration files to appropriate locations
COPY files /

LABEL \
org.opencontainers.image.title="Envbox" \
org.opencontainers.image.url="https://github.com/coder/envbox" \
org.opencontainers.image.source="https://github.com/coder/envbox" \
org.opencontainers.image.description="Run Docker in Docker in Kubernetes"

# Basic utilities
ARG DEBIAN_FRONTEND=noninteractive
# Ignore other repositories, as some require HTTPS
Expand Down