-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (41 loc) · 1.91 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Docker Image CI
on:
push:
branches:
- 'main'
workflow_dispatch:
schedule:
- cron: '0 0 */8 * *'
env:
DOCKER_USERNAME: fr3akyphantom
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_NAME: phoenix_firmware_dumper
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Bypass Build
if: "contains(github.event.head_commit.message, '[skip ci]')"
run: echo -en "Bypassing the main build, because the commit message contains - [skip ci]" && exit 0
- uses: actions/checkout@v2
- name: Create & Push the phoenix_firmware_dumper runner Container
if: "! contains(github.event.head_commit.message, '[skip ci]')"
run: >-
docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
echo ".git" > .dockerignore
docker build . --file Dockerfile
--rm --force-rm --compress --no-cache=true --pull
--label com.circleci.preserve-entrypoint=true
--label org.label-schema.build-date=$(date -u +"%Y-%m-%dT%H:%M:%S%Z")
--label org.label-schema.name="${IMAGE_NAME}"
--label org.label-schema.description="ROM Dumper, Based Upon Dumpyara from AndroidDumps, Infused w/ their Firmware_extractor"
--label org.label-schema.url="https://rokibhasansagar.github.io"
--label org.label-schema.vcs-ref=$(git rev-parse --short HEAD)
--label org.label-schema.vcs-url=$(git remote get-url origin)
--label org.label-schema.vendor="Rokib Hasan Sagar"
--label org.label-schema.version='1.0.1'
--label org.label-schema.schema-version="1.0"
--tag $DOCKER_USERNAME/$IMAGE_NAME:latest
docker push $DOCKER_USERNAME/$IMAGE_NAME:latest
docker tag $DOCKER_USERNAME/$IMAGE_NAME:latest $DOCKER_USERNAME/$IMAGE_NAME:$(date -u +"%Y.%j.%H")
docker push $DOCKER_USERNAME/$IMAGE_NAME:$(date -u +"%Y.%j.%H")