Updating blogs. #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |