Build and Push Noble Full #15
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: Build and Push Noble Full | |
on: | |
push: | |
branches: | |
- '**' | |
schedule: | |
- cron: '0 0 * * 0' # Runs at 00:00 UTC every Sunday | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@master | |
- name: Login to Github Packages | |
uses: docker/login-action@master | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GH_TOKEN }} | |
- name: Set push variable | |
id: set-push | |
run: | | |
if [[ "${{ github.ref }}" == "refs/heads/main" || "${{ github.ref }}" == "refs/heads/master" ]]; then | |
echo "PUSH=true" >> $GITHUB_ENV | |
else | |
echo "PUSH=false" >> $GITHUB_ENV | |
fi | |
- name: Build and push noble-full Docker image | |
uses: docker/build-push-action@master | |
with: | |
context: noble-full | |
file: noble-full/Dockerfile | |
platforms: linux/amd64 #inux/amd64,linux/arm64 | |
push: ${{ env.PUSH }} | |
tags: ghcr.io/jvrck/noble-full:latest |