Skip to content

Workflow file for this run

name: Build and Publish Docker Image
on:
release:
types: [published]
env:
IMAGE_NAME: fresco
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract release version
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/}
VERSION=${VERSION#v}
echo "version=$VERSION" >> $GITHUB_ENV
- name: Build and Tag Docker Image
run: |
docker build -t ghcr.io/complexdatacollective/fresco:${{ env.version }} -t ghcr.io/complexdatacollective/fresco:latest .
- name: Push Docker Images
run: |
docker push ghcr.io/complexdatacollective/fresco:${{ env.version }}
docker push ghcr.io/complexdatacollective/fresco:latest