2022-06-20 18:08:03 +03:00
|
|
|
# See https://docs.earthly.dev/ci-integration/vendor-specific-guides/gh-actions-integration
|
|
|
|
# for details.
|
|
|
|
|
2021-03-30 05:07:29 +03:00
|
|
|
name: Build nightly docker
|
|
|
|
|
|
|
|
on:
|
2021-09-13 09:45:14 +03:00
|
|
|
workflow_dispatch:
|
2021-03-30 05:07:29 +03:00
|
|
|
schedule:
|
2022-06-20 18:08:03 +03:00
|
|
|
- cron: '0 2 * * *'
|
2021-03-30 05:07:29 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
Docker:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-06-20 18:08:03 +03:00
|
|
|
- uses: earthly/actions-setup@v1
|
|
|
|
with:
|
|
|
|
version: 'latest' # or pin to an specific version, e.g. "v0.6.10"
|
|
|
|
|
|
|
|
- name: Earthly version
|
|
|
|
run: earthly --version
|
2021-03-30 05:07:29 +03:00
|
|
|
|
|
|
|
- name: Log into GitHub Container Registry
|
2022-06-20 18:08:03 +03:00
|
|
|
env:
|
2021-09-03 21:49:10 +03:00
|
|
|
GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
|
2021-03-30 05:07:29 +03:00
|
|
|
run: echo "${{ secrets.GH_CR_PAT }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
|
2021-09-03 21:49:10 +03:00
|
|
|
if: env.GH_CR_PAT != null
|
2021-03-30 05:07:29 +03:00
|
|
|
|
2022-06-20 18:08:03 +03:00
|
|
|
- name: Set up QEMU
|
|
|
|
id: qemu
|
|
|
|
uses: docker/setup-qemu-action@v1
|
|
|
|
with:
|
|
|
|
image: tonistiigi/binfmt:latest
|
|
|
|
platforms: all
|
|
|
|
|
2022-04-10 14:54:39 +03:00
|
|
|
- uses: actions/checkout@v3
|
2022-06-20 18:08:03 +03:00
|
|
|
- name: Checkout and build
|
|
|
|
if: env.GH_CR_PAT != null
|
|
|
|
env:
|
2021-09-03 21:49:10 +03:00
|
|
|
GH_CR_PAT: ${{ secrets.GH_CR_PAT }}
|
|
|
|
run: cd build/release && ./docker-nightly.sh
|