Files
vupay/.github/workflows/docker-nightly.yml

49 lines
1.5 KiB
YAML

name: docker-nightly
on:
schedule:
- cron: '0 16 * * *'
workflow_dispatch:
env:
APP_NAME: bepusdt
DOCKER_HUB_USER: v03413
DOCKER_HUB_REPO: v03413/bepusdt
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: 'main'
fetch-depth: 0
fetch-tags: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_BETA_TOKEN }}
- name: Generate App Version
run: |
echo "APP_VERSION=$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
echo "APP_DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
echo "VERSION_TAG=$(git describe --tags --abbrev=0)-nightly-$(git rev-parse --short=7 HEAD)" >> $GITHUB_ENV
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
platforms: |
linux/amd64
linux/arm64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
VERSION=${{ env.VERSION_TAG }}
tags: |
${{ env.DOCKER_HUB_REPO }}:nightly
${{ env.DOCKER_HUB_REPO }}:nightly-${{ env.APP_DATE }}-${{ env.APP_VERSION }}