Skip to content

Devcontainer Build #377

Devcontainer Build

Devcontainer Build #377

Workflow file for this run

name: Devcontainer Build
on:
workflow_dispatch:
schedule:
- cron: 0 6 * * *
pull_request:
push:
branches:
- main
tags:
- '*'
jobs:
check:
name: Run checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: curl -sfL https://direnv.net/install.sh | bash > /dev/null 2>&1
- run: ./bootstrap.sh
- uses: trunk-io/trunk-action@v1
if: github.event_name != 'pull_request'
build:
name: Build new image
runs-on: ubuntu-latest
needs: check
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: devcontainers/ci@v0.2
with:
imageName: ghcr.io/${{ github.repository }}
cacheFrom: ghcr.io/${{ github.repository }}
refFilterForPush: refs/heads/main
sync:
name: Synchronize branch
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: connor-baer/action-sync-branch@main
with:
branch: latest
token: ${{ secrets.GITHUB_TOKEN }}
force: true