Skip to content

Update Docker image push command #13

Update Docker image push command

Update Docker image push command #13

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag kode-pos:latest
- name: Log in to Docker Hub
run: echo ${{ secrets.CR_PAT }} | docker login ghcr.io -u Ashaffah --password-stdin
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ashaffah/kode-pos
- name: Build and push Docker image
# uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
run: docker push kode-pos:latest
# with:
# context: .
# file: ./Dockerfile
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}