Skip to content

Filter pipeline run

Filter pipeline run #4

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- master
paths:
- go-k8s-app/**
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the Docker image
run: |
docker build -t ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest go-k8s-app
- name: Push the Docker image
run: |
docker push ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest