Skip to content

up image

up image #11

Workflow file for this run

name: Build & Push Docker Image
on:
push:
branches: ["main"]
workflow_dispatch:
env:
IMAGE_NAME: terraform-hcloud-runner-webhook
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v6
with:
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest