mirror of
https://github.com/atuinsh/atuin.git
synced 2026-10-01 13:57:34 +02:00
I want to be able to easily spin up remote devenvs, so here I am adding a devcontainer spec. I imagine it will grow a LOT soon, but this is just to test the machinery. ## Checks - [ ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [ ] I have checked that there are no existing pull requests for the same thing <!-- codesmith:footer --> --- <a href="https://app.blacksmith.sh/atuinsh/codesmith/atuin/pr/3871"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v2.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v2.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1788725102&installation_model_id=431321&pr_number=3871&repository=atuinsh%2Fatuin&return_to=https%3A%2F%2Fgithub.com%2Fatuinsh%2Fatuin%2Fpull%2F3871&signature=dbf1d1d5cefa9269c31ce3f6d42618579e8fca00790947322a39234ae0bcf661"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a> <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need. Autofix is disabled.</sup> <!-- codesmith:autofix:disabled --> <!-- /codesmith:footer -->
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: build-devcontainer
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '.devcontainer/**'
|
|
- '.github/workflows/devcontainer.yaml'
|
|
pull_request:
|
|
paths:
|
|
- '.devcontainer/**'
|
|
- '.github/workflows/devcontainer.yaml'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
concurrency:
|
|
group: ${{ github.ref }}-devcontainer
|
|
cancel-in-progress: true
|
|
permissions:
|
|
packages: write
|
|
contents: read
|
|
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Get Repo Owner
|
|
run: echo "REPO_OWNER=$(echo ${{ github.repository_owner }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
|
|
|
- uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to container registry
|
|
uses: docker/login-action@v4
|
|
with:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
registry: ghcr.io
|
|
|
|
# Builds via the devcontainer CLI rather than plain `docker build`, so the
|
|
# `features` in devcontainer.json (including the local ./features/atuin)
|
|
# get baked into the published image.
|
|
- name: Build and push
|
|
uses: devcontainers/ci@v0.3
|
|
with:
|
|
imageName: ghcr.io/${{ env.REPO_OWNER }}/atuin-devcontainer
|
|
imageTag: latest,${{ github.sha }}
|
|
cacheFrom: ghcr.io/${{ env.REPO_OWNER }}/atuin-devcontainer:latest
|
|
push: ${{ github.event_name == 'pull_request' && 'never' || 'always' }}
|