Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
truskovskiyk committed Mar 16, 2024
1 parent 29d3ba8 commit 04cf6ff
Showing 1 changed file with 31 additions and 48 deletions.
79 changes: 31 additions & 48 deletions .github/workflows/module-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
app-ml-docker:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -40,11 +42,12 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ghcr.io/app-ml
images: ghcr.io/kyryl-opens-ml/app-ml

- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
Expand All @@ -54,55 +57,35 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# build-and-push-app-ml:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2

# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# context: week-1/app-ml/
# file: week-1/app-ml/Dockerfile
# push: true
# tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_APP }}:latest
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_APP }}:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_APP }}:buildcache,mode=max

# build-and-push-app-web:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2

# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
app-web-docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ghcr.io/kyryl-opens-ml/app-web

# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: module-1/app-web/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# - name: Build and push
# uses: docker/build-push-action@v2
# with:
# context: week-1/app-web/
# file: week-1/app-web/Dockerfile
# push: true
# tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_WEB }}:latest
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_WEB }}:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_ML_WEB }}:buildcache,mode=max

# build-and-push-app-ml-cli-comands:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 04cf6ff

Please sign in to comment.