Skip to content

Commit

Permalink
chore: enhance nightly build workflow with Docker support
Browse files Browse the repository at this point in the history
- Added a new job for building and pushing Docker images to GitHub Container Registry.
- Configured the workflow to run on multiple platforms (linux/amd64 and linux/arm64) for broader compatibility.
- Implemented steps for checking out code, setting up Docker Buildx, logging into the GitHub Container Registry, and generating metadata for Docker images.
- Updated the Docker actions to their latest versions for improved reliability and security.

These changes improve the nightly build process by integrating Docker image management, ensuring a more robust and efficient workflow.
  • Loading branch information
tphakala committed Jan 16, 2025
1 parent d70b79e commit 23804d7
Showing 1 changed file with 43 additions and 1 deletion.
44 changes: 43 additions & 1 deletion .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,46 @@ jobs:
delete_tags: true
delete_tag_pattern: ^nightly-
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docker:
runs-on: ubuntu-22.04
needs: nightly
strategy:
matrix:
platform: [linux/amd64, linux/arm64]

steps:
- name: Checkout code
uses: actions/checkout@v4

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Generate downcase repository name
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.REPO }}
tags: |
type=raw,value=nightly
type=raw,value=nightly-{{date 'YYYYMMDD'}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 23804d7

Please sign in to comment.