Nightly Docker Build #18
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 Docker Build | |
on: | |
schedule: | |
# Runs at midnight UTC every day | |
- cron: '0 0 * * *' | |
env: | |
USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
PASSWORD: ${{ secrets.DOCKER_TOKEN }} | |
jobs: | |
build: | |
runs-on: 'ubuntu-latest' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 21 | |
- name: Build with Maven | |
run: mvn clean package | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ env.USERNAME }} | |
password: ${{ env.PASSWORD }} | |
- name: Copy jar | |
run: cp /home/runner/work/camellia/camellia/camellia-redis-proxy/camellia-redis-proxy-bootstrap/target/camellia-redis-proxy-bootstrap-*.jar ./camellia-redis-proxy-bootstrap.jar | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./docs/camellia-redis-proxy/deploy/docker/Dockerfile-nightly | |
push: true | |
tags: ${{ env.USERNAME }}/camellia-redis-proxy:nightly |