Skip to content

Merge pull request #117 from qbarrand/dependabot/go_modules/golang.or… #356

Merge pull request #117 from qbarrand/dependabot/go_modules/golang.or…

Merge pull request #117 from qbarrand/dependabot/go_modules/golang.or… #356

name: Container image
on:
pull_request:
branches: [main]
push:
tags: ['*']
branches: [main]
jobs:
build-push:
name: Build and push
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/qbarrand/gitstream
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Check out the repo
uses: actions/checkout@v4
- name: Build and push the image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}