byt github actions - youre too expensive for private repos and my awesome drone ci caching is working nicely
This commit is contained in:
parent
519e5f384a
commit
2f8adb99e8
1 changed files with 0 additions and 46 deletions
46
.github/workflows/api.yaml
vendored
46
.github/workflows/api.yaml
vendored
|
|
@ -1,46 +0,0 @@
|
||||||
name: Build and Push Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main ]
|
|
||||||
# pull_request:
|
|
||||||
# branches: [ main ] # Optional: run on PRs to main branch
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
|
|
||||||
env:
|
|
||||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
IMAGE_NAME: viktorbarzin/realestatecrawler
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-and-push:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Extract metadata (tags, labels) for Docker
|
|
||||||
id: meta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: ${{ env.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
|
|
||||||
tags: |
|
|
||||||
latest
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./crawler/
|
|
||||||
push: ${{ github.ref == 'refs/heads/main' }} # Only push if on main branch
|
|
||||||
# tags: ${{ steps.meta.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue