Skip to content

Push new post.

Push new post. #53

name: Docker Image build and Push to DO Registry
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
# Prep things for doing doctl stuff
- name: Install doctl
uses: digitalocean/action-doctl@v2
with:
token: ${{ secrets.DO_TOKEN }}
# Do not create permanent tokens
- name: Login to registry
run: doctl registry login --expiry-seconds 600
- name: Pull code
uses: actions/checkout@v2
with:
submodules: 'recursive'
# The only private repo here was removed.
# ssh-key: ${{ secrets.DEPLOY_KEY }}
#
#
- name: Configure Git
run: |
/usr/bin/git config --global user.name "${GITHUB_ACTOR}"
/usr/bin/git config --global user.email "${GITHUB_ACTOR}@thenextbug.com"
- name: Setup SSH Keys and known_hosts
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
- name: Build and publish submodule projects
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: make ci