-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.18 KB
/
docker.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
name: "Docker Build"
on:
workflow_dispatch:
schedule:
- cron: "33 3 * * *"
jobs:
docker_build:
name: "Docker Build"
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Log in to ghcr
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & Push
uses: docker/build-push-action@v2
with:
context: ./
push: true
tags: ghcr.io/${{ github.repository }}:latest
print_current_version:
name: "Print Current Version"
runs-on: ubuntu-latest
needs:
- docker_build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Echo Version
run: |-
docker pull ghcr.io/${{ github.repository }}:latest
echo $(docker run --rm ghcr.io/${{ github.repository }}:latest version) > current_version.txt
- name: Commit & Push
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
message: update current version
branch: master