Skip to content

Commit

Permalink
Merge pull request #133 from SiziweLupondo/Docker_workflow
Browse files Browse the repository at this point in the history
Docker workflow
  • Loading branch information
Simpleshell3 authored Aug 6, 2024
2 parents 5181843 + ca10278 commit a024544
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build Docker Image-ubuntu

on:
push:
branches:
- develop
- Docker_workflow
pull_request:
branches:
- develop
- Docker_workflow

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build Docker image
run: |
ls
pushd Docker
docker build -f Dockerfile.flint.ubuntu.18.04 -t moja/flint:ubuntu-18.04 .
popd
- name: Save Docker image as artifact
run: |
docker save moja/flint:ubuntu-18.04 | gzip > flint_docker_image.tar.gz
shell: bash

- name: Upload Docker image artifact
uses: actions/upload-artifact@v2
with:
name: docker-image
path: flint_docker_image.tar.gz

0 comments on commit a024544

Please sign in to comment.