Skip to content

nightly

nightly #922

Workflow file for this run

name: nightly
on:
schedule:
- cron: '0 10 * * *' # everyday at 10am
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
jobs:
docker:
name: 'Nightly Build'
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v2'
- uses: extractions/setup-just@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: clux
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build nightly image
uses: docker/build-push-action@v2
with:
context: .
push: false
build-args: |
CHANNEL=nightly
tags: clux/muslrust:temp
- name: Compute tags
shell: bash
run: |
docker run clux/muslrust:temp rustc --version
RUST_VER="$(docker run clux/muslrust:temp rustc --version | grep -oE "[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]")"
RUST_DATE="$(date +"%Y-%m-%d")"
RUST_CHANNEL=nightly
echo "TAG1=clux/muslrust:${RUST_CHANNEL}" >> $GITHUB_ENV
echo "TAG2=clux/muslrust:${RUST_CHANNEL}-${RUST_DATE}" >> $GITHUB_ENV
echo "TAG3=clux/muslrust:${RUST_VER}-${RUST_CHANNEL}-${RUST_DATE}" >> $GITHUB_ENV
- name: Run tests
shell: bash
run: just test
- name: Push image under computed tags
uses: docker/build-push-action@v2
with:
context: .
build-args: |
CHANNEL=nightly
push: ${{ github.event_name != 'pull_request' }}
tags: clux/muslrust:latest,${{ env.TAG1 }},${{ env.TAG2 }},${{ env.TAG3 }}