Skip to content

Merge pull request #19 from ngn13/dependabot/go_modules/golang.org/x/… #26

Merge pull request #19 from ngn13/dependabot/go_modules/golang.org/x/…

Merge pull request #19 from ngn13/dependabot/go_modules/golang.org/x/… #26

Workflow file for this run

name: Docker
on:
push:
branches:
- "main"
paths-ignore:
- ".github/workflows/test.yml"
- "compose.example.yml"
- "tests/*"
- "README.md"
- "LICENSE.txt"
- ".gitignore"
env:
REGISTRY: ghcr.io
IMAGE: ${{github.repository}}
jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@main
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up buildx
uses: docker/setup-buildx-action@v3
- name: Login to container repo
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Obtain the version from the commit ID
run: echo "VERSION=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Build and push docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/386,linux/arm64
tags: |
${{env.REGISTRY}}/${{env.IMAGE}}:${{env.VERSION}}
${{env.REGISTRY}}/${{env.IMAGE}}:latest