Skip to content

Merge pull request #156 from sapcc/renovate/golang.org-x-exp-digest #83

Merge pull request #156 from sapcc/renovate/golang.org-x-exp-digest

Merge pull request #156 from sapcc/renovate/golang.org-x-exp-digest #83

name: Container Registry GHCR
"on":
push:
branches:
- 'master'
tags:
- 'v*'
permissions:
contents: read
packages: write
jobs:
build-and-push-image:
name: Push container to ghcr.io
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
username: ${{ github.actor }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
push: true
tags: ${{ steps.meta.outputs.tags }}