Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

Commit

Permalink
Add pipeline for nightly builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanraic committed Jan 20, 2024
1 parent e43e61a commit 251e8c9
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/docker-builds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ jobs:
environment: 'dockerhub'
runs-on: ubuntu-latest
steps:
- name: Debug Step
run: |
echo "GITHUB_REF: $GITHUB_REF"
echo "GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME"
echo "Ref: ${{ github.ref }}"
echo "Event name: ${{ github.event_name }}"
echo "Event ref: ${{ github.event.ref }}"
- name: Code Checkout
uses: actions/checkout@v4

Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/docker-nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Docker Nightly Builds

on:
workflow_dispatch:
schedule:
# 03.15 AM UTC
- cron: '15 3 * * *'

jobs:
docker-image-build:
environment: 'dockerhub'
runs-on: ubuntu-latest
steps:
- name: Code Checkout
uses: actions/checkout@v4

- name: Dockerhub Login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}

- name: Docker Buildx Setup
uses: docker/setup-buildx-action@v3

- name: Nighhly Build/Push
uses: docker/build-push-action@v5
with:
push: true
platforms: |
linux/amd64
context: src
tags: |
bojanraic/bwsm-eso:nightly
- name: Most Recent Semver Tag
uses: actions-ecosystem/action-get-latest-tag@v1
with:
semver_only: true
id: most-recent-tag

- name: Switch to Most Recent Tag
if: steps.most-recent-tag.outputs.tag
run: git checkout ${{ steps.most-recent-tag.outputs.tag }}

- name: Scheduled Tag Build/Push
uses: docker/build-push-action@v5
with:
push: true
platforms: |
linux/amd64
context: src
tags: |
bojanraic/bwsm-eso:${{ steps.most-recent-tag.outputs.tag }}

0 comments on commit 251e8c9

Please sign in to comment.