Skip to content

Build Images

Build Images #33

Workflow file for this run

name: Build Images
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag of the base, local-base, and dev images'
required: false
type: string
default: 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
platforms: linux/arm64,linux/amd64
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_TOKEN }}
- name: Build and push base
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:.devcontainer/base-dev"
file: base-dev.Dockerfile
push: true
tags: ghcr.io/ubcsailbot/sailbot_workspace/base:${{ inputs.tag }}
platforms: linux/arm64,linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
target: base
- name: Build and push local-base
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:.devcontainer/base-dev"
file: base-dev.Dockerfile
push: true
tags: ghcr.io/ubcsailbot/sailbot_workspace/local-base:${{ inputs.tag }}
platforms: linux/arm64,linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
target: local-base
- name: Build and push dev
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:.devcontainer/base-dev"
file: base-dev.Dockerfile
push: true
tags: ghcr.io/ubcsailbot/sailbot_workspace/dev:${{ inputs.tag }}
platforms: linux/arm64,linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max