Skip to content

Merge pull request #41 from 0xFacet/v1.0.1 #47

Merge pull request #41 from 0xFacet/v1.0.1

Merge pull request #41 from 0xFacet/v1.0.1 #47

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "*v*", "main" ]
tags:
- '*v*'
release:
types: [published]
pull_request:
branches: [ "*v*", "main" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- 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: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/0xfacet/facet-node
tags: |
# Latest commit SHA
type=sha,format=short
# Branch names (v1.0.0, main, etc)
type=ref,event=branch
# Git tags (v1.0.0, etc)
type=ref,event=tag
# Semantic versioning for releases
type=semver,pattern={{version}},event=tag
type=semver,pattern={{major}}.{{minor}},event=tag
type=semver,pattern={{major}},event=tag
# Latest release tag
type=raw,value=latest-release,enable=${{ github.event_name == 'release' }}
# Latest on main branch
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- 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 }}