-
-
Notifications
You must be signed in to change notification settings - Fork 10
30 lines (25 loc) · 1.11 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
name: docker
on: [push, workflow_dispatch]
jobs:
build-and-publish-latest:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # Running this job only for develop branch
steps:
- uses: actions/checkout@v2 # Checking out the repo
- name: Build and Publish head Docker image
uses: VaultVulp/gp-docker-action@1.1.7
with:
github-token: ${{ secrets.TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
image-name: jjmumblebot-latest # Provide Docker image name
image-tag: head # Raise the flag to try to pull image
build-and-publish-tag:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/') # Running this job only for tags
steps:
- uses: actions/checkout@v2
- name: Build and Publish Tag Docker image
uses: VaultVulp/gp-docker-action@1.1.7
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Provide GITHUB_TOKEN to login into the GitHub Packages
image-name: jjmumblebot # Provide only Docker image name
extract-git-tag: true # Provide flag to extract Docker image tag from git reference