Build and Upload Docker Image of Current Dev Branch to GHCR #67
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 Upload Docker Image of Current Dev Branch to GHCR | |
on: | |
schedule: | |
- cron: "0 16 * * 1" # Weekly at noon EST on Monday | |
workflow_dispatch: | |
concurrency: # Cancel previous workflows on the same pull request | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release-image: | |
name: Build and Upload Docker Image of Current Dev Branch to GHCR | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- 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: ${{ secrets.DOCKER_UPLOADER_USERNAME }} | |
password: ${{ secrets.DOCKER_UPLOADER_PASSWORD }} | |
- name: Get current date | |
id: date | |
run: | | |
date_tag="$(date +'%Y-%m-%d')" | |
echo "date_tag=$date_tag" >> $GITHUB_OUTPUT | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: true # Push is a shorthand for --output=type=registry | |
tags: ghcr.io/catalystneuro/neuroconv:dev,ghcr.io/catalystneuro/neuroconv:${{ steps.date.outputs.date_tag }} | |
context: . | |
file: dockerfiles/neuroconv_dev_dockerfile | |
provenance: false |