-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.1 KB
/
docker-build.yml
File metadata and controls
45 lines (37 loc) · 1.1 KB
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
42
43
44
45
name: ci
on:
push:
tags:
- '*' # Runs only when a tag is pushed
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 3072
swap-size-mb: 1024
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
overprovision-lvm: 'true'
- uses: actions/checkout@v4
- name: Inspect Disk Space
run: df -h
- name: Prune Docker
run: docker system prune -af
- uses: actions/checkout@v4
- name: Login to Docker Hub
run: echo "${{ secrets.GH_DOCKERHUB }}" | docker login -u fnzv --password-stdin
- name: Build and Push image
run: |
TAG_NAME=${{ github.ref_name }}
docker build \
-t fnzv/trash:${TAG_NAME} \
-t fnzv/trash:latest \
.
docker push fnzv/trash:${TAG_NAME}
docker push fnzv/trash:latest