Skip to content

first trial pushing docker image to github container #2

first trial pushing docker image to github container

first trial pushing docker image to github container #2

name: Build and Push Docker Image
on:
push:
branches:
- main # or any branch you deploy from
- fix_issue_GHCR
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write # required for GHCR
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t ghcr.io/icr-rse-group/nextflow-app:latest .
- name: Push Docker image
run: |
docker push ghcr.io/icr-rse-group/nextflow-app:latest