-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (35 loc) · 1.14 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Build Image using Dockerfile
on: [push]
jobs:
build:
name: Build image
runs-on: ubuntu-latest
env:
IMAGE_NAME: gfvirga/httpliveness
IMAGE_TAGS: latest ${{ github.sha }}
steps:
- uses: actions/checkout@v2
- name: Fix Attempt
run: |
sudo apt-get install fuse-overlayfs
mkdir -vp ~/.config/containers
printf "[storage.options]\nmount_program=\"/usr/bin/fuse-overlayfs\"" > ~/.config/containers/storage.conf
- name: Buildah Action
id: build-image
uses: redhat-actions/buildah-build@v2
with:
image: ${{ env.IMAGE_NAME }}
tags: ${{ env.IMAGE_TAGS }}
dockerfiles: |
./Dockerfile
- name: Push To Dockerhub
id: push-to-dockerhub
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: "docker.io"
username: "gfvirga"
password: ${{ secrets.DOCKER_TOKEN }}
- name: Use the image
run: echo "New image has been pushed to ${{ steps.push-to-dockerhub.outputs.registry-paths }}"