forked from giuem/uptimerobot-page
-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (31 loc) · 1.03 KB
/
github_package_repository.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
name: Publish Docker image to GitHub Package Registry
on:
push:
branches: master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Master
uses: actions/checkout@master
#This Action Emits 2 Variables, IMAGE_SHA_NAME and IMAGE_URL
#which you can reference in subsequent steps
- name: Publish Docker Image to GPR
uses: machine-learning-apps/gpr-docker-publish@master
id: docker
with:
IMAGE_NAME: 'uptimerobot-dark-mode'
TAG: 'latest'
DOCKERFILE_PATH: 'Dockerfile'
BUILD_CONTEXT: '.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This second step is illustrative and shows how to reference the
# output variables. This is completely optional.
- name: Show outputs of previous step
run: |
echo "The name:tag of the Docker Image is: $VAR1"
echo "The docker image is hosted at $VAR2"
env:
VAR1: ${{ steps.docker.outputs.IMAGE_SHA_NAME }}
VAR2: ${{ steps.docker.outputs.IMAGE_URL }}