mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
42 lines
1.6 KiB
YAML
42 lines
1.6 KiB
YAML
name: Build Dev Container
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- .devcontainer/*
|
|
- .github/workflows/dev-container.yml
|
|
schedule:
|
|
- cron: '0 12 * * 2' # 12 noon every tuesday
|
|
|
|
jobs:
|
|
dev_container_build:
|
|
name: Bazel Build (Dev Container)
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
- name: Mount bazel cache
|
|
uses: actions/cache@v2.1.1
|
|
with:
|
|
path: '/home/runner/.cache/bazel'
|
|
key: bazel_dev_container
|
|
|
|
- name: Install bazelisk
|
|
run: |
|
|
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.1.0/bazelisk-linux-amd64"
|
|
mkdir -p "${GITHUB_WORKSPACE}/bin/"
|
|
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
|
|
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
|
|
|
|
- name: Build & Publish Dev Container
|
|
run: |
|
|
echo ${{github.token}} | docker login -u ${{github.actor}} --password-stdin docker.pkg.github.com
|
|
"${GITHUB_WORKSPACE}/bin/bazel" run \
|
|
--stamp \
|
|
--workspace_status_command hack/workspace_status.sh \
|
|
//src/dev-container:publish-dev-container
|
|
|
|
echo ${{secrets.DOCKER_PASSWORD}} | docker login -u ${{secrets.DOCKER_USERNAME}} --password-stdin
|
|
"${GITHUB_WORKSPACE}/bin/bazel" run \
|
|
--stamp \
|
|
--workspace_status_command hack/workspace_status.sh \
|
|
//src/dev-container:publish-dev-container-dockerhub
|