mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
44 lines
1.0 KiB
YAML
44 lines
1.0 KiB
YAML
name: dogfood
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "*"
|
|
paths:
|
|
- "dogfood/**"
|
|
pull_request:
|
|
paths:
|
|
- "dogfood/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Get branch name
|
|
id: branch-name
|
|
uses: tj-actions/branch-names@v5.4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v2
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v3
|
|
with:
|
|
context: "{{defaultContext}}:dogfood"
|
|
push: true
|
|
tags: "codercom/oss-dogfood:${{ steps.branch-name.outputs.current_branch }},codercom/oss-dogfood:latest"
|
|
cache-from: type=registry,ref=codercom/oss-dogfood:latest
|
|
cache-to: type=inline
|