Update docker/login-action digest to a5609cb #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: create container | |
on: | |
push: | |
branches: | |
- "master" | |
- "develop" | |
- "berta" | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get branch name | |
id: branch-name | |
uses: tj-actions/branch-names@v7 | |
- name: Log in to the Container registry | |
uses: docker/login-action@a5609cb39f57be157c39b77359abfaa43aeaeb8f | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Semantic versioning | |
id: versioning | |
uses: PaulHatch/[email protected] | |
with: | |
branch: develop | |
tag_prefix: "v" | |
major_pattern: "BREAKING CHANGE:" | |
minor_pattern: "feat:" | |
version_format: "v${major}.${minor}.${patch}-${{ steps.branch-name.outputs.current_branch }}+${increment}" | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
labels: | | |
org.opencontainers.image.version=${{ steps.versioning.outputs.version }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=tag | |
type=semver,pattern={{version}} | |
type=semver,pattern={{raw}} | |
type=raw,value=${{ steps.versioning.outputs.version }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@9311bf5263ae5b36f3ec67aff768790c6e2344ad | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |