-
Notifications
You must be signed in to change notification settings - Fork 2
29 lines (26 loc) · 880 Bytes
/
dockerimage.yml
File metadata and controls
29 lines (26 loc) · 880 Bytes
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
name: Docker Image CI
on:
push:
branches:
- master
jobs:
buildImage:
runs-on: ubuntu-latest
env:
REGISTRY: docker.pkg.github.com
REPOSITORY: docker.pkg.github.com/marjamis/debugger/debugger
steps:
- uses: actions/checkout@master
- name: createPublicSSHKeyFile
run: |
echo "${{ secrets.PUBLIC_SSH_KEY }}" > ./testing.pub
echo "${{ secrets.EXAMPLE_CERT }}" > ./www.example.com.crt
echo "${{ secrets.EXAMPLE_CERT_KEY }}" > ./www.example.com.key
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag $REPOSITORY:latest
docker tag $REPOSITORY:latest $REPOSITORY:$(date +%s)
- name: Push image to Github Package Registry
run: |
docker login -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} $REGISTRY
docker push -a $REPOSITORY