2021-07-27 08:00:00 +00:00
|
|
|
name: CI
|
2021-07-09 20:33:03 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2021-08-17 19:41:39 +00:00
|
|
|
paths-ignore:
|
|
|
|
- 'README.md'
|
2021-07-09 20:33:03 +00:00
|
|
|
|
2021-07-15 23:47:35 +00:00
|
|
|
env:
|
|
|
|
DOCKER_TAG: ${{ github.sha }}
|
|
|
|
|
2021-07-09 20:33:03 +00:00
|
|
|
jobs:
|
2021-07-15 23:47:35 +00:00
|
|
|
build-and-push-images:
|
2021-07-09 20:33:03 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-07-16 11:00:00 +00:00
|
|
|
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
2021-07-09 20:33:03 +00:00
|
|
|
|
2021-07-15 23:47:35 +00:00
|
|
|
- name: Login to the Docker registry
|
2021-07-16 11:00:00 +00:00
|
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # v1.10.0
|
2021-07-15 23:47:35 +00:00
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
2021-07-09 20:33:03 +00:00
|
|
|
|
2021-07-15 23:47:35 +00:00
|
|
|
- run: make build-images
|
|
|
|
- run: make push-images
|
2021-07-09 20:33:03 +00:00
|
|
|
|
2021-07-27 16:36:01 +00:00
|
|
|
- name: Add the deployment SSH key
|
|
|
|
uses: shimataro/ssh-key-action@6f350ca8484d8d55c2e361e74d17e638dabe713a # 2.1.0
|
|
|
|
with:
|
|
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
name: id_rsa
|
|
|
|
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
|
|
|
|
|
|
|
- run: make deploy
|
|
|
|
|
2021-07-09 20:33:03 +00:00
|
|
|
# vim: sw=2 ts=2
|