feat: add devcontainer container on ghcr (#1240)
Signed-off-by: Devin Buhl <devin@buhl.casa>
This commit is contained in:
1 parent
8860565d25
commit
2206dbc519
4 files changed
+73
-29
No files matched your search
@@ -0,0 +1,42 @@
|
||||
---
|
||||
name: "Publish devcontainer"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths: [".devcontainer/devcontainer.build.json"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
paths: [".devcontainer/devcontainer.build.json"]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish-devcontainer:
|
||||
name: Publish devcontainer
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- if: ${{ github.event_name != 'pull_request' }}
|
||||
name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: devcontainers/ci@v0.3
|
||||
with:
|
||||
imageName: ghcr.io/${{ github.repository }}/devcontainer
|
||||
imageTag: base,latest
|
||||
configFile: .devcontainer/devcontainer.build.json
|
||||
push: ${{ github.event_name == 'pull_request' && 'never' || 'always' }}
|
||||
Reference in new issue
Block a user