mirror of
https://github.com/rodneyosodo/gophercon-africa-2024.git
synced 2026-06-23 04:10:06 +00:00
b4369be774
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
44 lines
866 B
YAML
44 lines
866 B
YAML
name: Create and publish Docker image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "v*"
|
|
paths:
|
|
- ".github/workflows/cd.yaml"
|
|
- "**.go"
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build-and-push-image:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Fetch tags for the build
|
|
run: |
|
|
git fetch --prune --unshallow --tags
|
|
|
|
- name: Set up Docker Build
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push Docker image
|
|
run: |
|
|
make docker-push
|