Nightly Builds #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Nightly Builds | |
on: | |
schedule: | |
- cron: '0 0 * * *' # Every night midnight | |
# This workflow needs to pass if there is a PR changing it. | |
pull_request: | |
paths: | |
- ".github/workflows/nightly-ui.yaml" | |
workflow_dispatch: # Or manually - for testing | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: s3gw | |
submodules: true | |
- name: Checkout UI HEAD | |
working-directory: s3gw/ui | |
run: | | |
git fetch | |
git checkout main | |
git submodule update --init --recursive | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Quay Login | |
uses: docker/login-action@v1 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USERNAME }} | |
password: ${{ secrets.QUAY_PASSWORD }} | |
- name: Generate Tag based on Date | |
id: date | |
run: | | |
DATE="$(date +%Y-%m-%d)" | |
echo "tag=nightly-${DATE}" >> $GITHUB_OUTPUT | |
- name: Build and Push Container | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
build-args: | | |
QUAY_EXPIRATION=1w | |
tags: | | |
quay.io/s3gw/s3gw-ui:${{ steps.date.outputs.tag }} | |
quay.io/s3gw/s3gw-ui:nightly-latest | |
file: s3gw/ui/src/Dockerfile | |
context: s3gw/ui/src |