Skip to content

Commit

Permalink
Thu Dec 5 16:41:34 CET 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalii Dubovoy committed Dec 5, 2024
1 parent fb0ecb9 commit e48b344
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci-image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Image

on:
workflow_dispatch:
push:
branches:
- main

env:
REGISTRY: 'ghcr.io/${{github.repository_owner}}'
IMAGE_NAME: 'nginx-proxy'

jobs:
ci:
name: Build and push
runs-on: ubuntu-latest
defaults:
run:
shell: bash
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Docker metadata
id: metadata
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY}}/${{ env.IMAGE_NAME}}
tags: |
type=sha
flavor: |
latest=true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY}}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit e48b344

Please sign in to comment.