Skip to content

Merge pull request #9 from carapace-sh/dockerfile-copy #18

Merge pull request #9 from carapace-sh/dockerfile-copy

Merge pull request #9 from carapace-sh/dockerfile-copy #18

Workflow file for this run

name: Go
on:
push:
branches:
- 'master'
tags:
- '*'
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: |
tag=latest
[[ "$GITHUB_REF" =~ ^refs/tags/ ]] && tag="${GITHUB_REF/refs\/tags\//}"
docker build . --tag "ghcr.io/carapace-sh/go:${tag}"
docker push "ghcr.io/carapace-sh/go:${tag}"