Skip to content

Merge pull request #5 from siketyan/dependabot/go_modules/github.com/… #12

Merge pull request #5 from siketyan/dependabot/go_modules/github.com/…

Merge pull request #5 from siketyan/dependabot/go_modules/github.com/… #12

Workflow file for this run

name: docker
on:
push:
branches:
- main
release:
types:
- published
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get shorter hash of the commit
id: shorter_hash
run: echo "hash=$(echo ${GITHUB_SHA} | cut -c1-7)" >> ${GITHUB_OUTPUT}
- name: Build and push
uses: docker/build-push-action@v4
with:
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: 'linux/amd64,linux/arm64'
tags: |
ghcr.io/siketyan/nakoud:${{ steps.shorter_hash.outputs.hash }}
ghcr.io/siketyan/nakoud:${{ github.event.release.tag_name || 'latest' }}