Skip to content

Commit

Permalink
CI (hopefully)
Browse files Browse the repository at this point in the history
  • Loading branch information
MotorTruck1221 committed Jul 15, 2024
1 parent 440ecf2 commit e153948
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Docker image
on:
push:
tags:
- v*
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build-and-push:
name: Build and push Docker image to registry
runs-on: ubuntu-latest
if: github.repository_owner == 'titaniumnetwork-dev'
permissions:
contents: write
packages: write
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup docker buildx
uses: docker/setup-buildx-action@latest
- name: Login To registry ${{ env.REGISTRY }}
uses: docker/login-action@latest
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@latest
with:
images: ${{ env.REGISTRY }}/titaniumnetwork-dev/incognito
- name: Build and push
id: build-and-push
uses: docker/build-push-action@latest
with:
context: .
file: ./Dockerfile
name: incognito
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit e153948

Please sign in to comment.