Skip to content

Commit

Permalink
updating job
Browse files Browse the repository at this point in the history
  • Loading branch information
san-est committed Jun 12, 2024
1 parent 354abb9 commit 6e41730
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/build-and-push-dockerimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,33 @@ on:
pull_request:
branches: [ "main" ]

#adding this so that I can test my jovs and run workflows manually from the Actions tab in the repository
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: san-est/gk-webapp
IMAGE:TAG: $(date +%s)

jobs:

build:
build-and-push:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write

steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag gk-webapp:$(date +%s)

- name: Login to registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push the Docker image
uses: docker/build-push-action@v2

0 comments on commit 6e41730

Please sign in to comment.