Skip to content

Commit

Permalink
implementato push a ghcr [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
umbertocicciaa committed Sep 9, 2024
1 parent f4e032d commit 6808705
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ on:
branches: [ "main" ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build the Docker image
run: docker build . --file ./CloudProject/Dockerfile --tag cloud_ci_cd_image:$(date +%s)
run: docker build . --file ./CloudProject/Dockerfile --tag ghcr.io/${{ github.repository_owner }}/cloud_ci_cd_image:$(date +%s)

- name: Push the Docker image
run: docker push ghcr.io/${{ github.repository_owner }}/cloud_ci_cd_image:$(date +%s)

0 comments on commit 6808705

Please sign in to comment.