Skip to content

Commit

Permalink
push to docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ksaifullah committed Apr 24, 2024
1 parent 4256b76 commit c206033
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ on:
push:
branches: ['main']

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

jobs:
build-and-push-image:
runs-on: ubuntu-latest
Expand All @@ -20,18 +16,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: brainstation/cloud-guild

- name: Build and push Docker image
uses: docker/build-push-action@v5
Expand Down

0 comments on commit c206033

Please sign in to comment.