Skip to content

Commit

Permalink
Create docker-image-and-run.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
NaC-L committed Jan 22, 2025
1 parent 99a37c0 commit 06a5341
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-image-and-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Docker Image CI

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

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build the Docker image
run: docker build . --file Dockerfile --tag my-image-name:latest

- name: Create a container and extract the binary
run: |
# Create a container
docker create --name extract-container my-image-name:latest
# Copy the binary from the container
mkdir -p ./output
docker cp extract-container:/root/Mergen/build/lifter ./output/lifter
./output/lifter

# Remove the container
docker rm extract-container

- name: Upload the extracted binary as an artifact
uses: actions/upload-artifact@v4
with:
name: Lifter
path: ./output/lifter

0 comments on commit 06a5341

Please sign in to comment.