Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumyaworks authored Sep 14, 2023
1 parent ee03866 commit 7a8d004
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
name: Docker Image CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

name: publish
on: [push]
jobs:

build:

publish-docker-image:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the Docker image with a new name
run: |
# Change the image name and tag as needed
IMAGE_NAME="ghcr.io/Soumyaworks/manylinux2014-llvm:12-x86_64"
docker build . --tag $IMAGE_NAME
docker run $IMAGE_NAME
docker push $IMAGE_NAME

0 comments on commit 7a8d004

Please sign in to comment.