Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save octohedron/2bd72d351a918f29c52024c088d63f0b to your computer and use it in GitHub Desktop.
Save octohedron/2bd72d351a918f29c52024c088d63f0b to your computer and use it in GitHub Desktop.
name: Docker Image CI
env:
GIT_NAME: ${{ secrets.GIT_NAME }}
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
GIT_USER: ${{ secrets.GIT_USER }}
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
container:
image: example.com/private-repo:latest
credentials:
username: ${{ secrets.GIT_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
steps:
- uses: actions/checkout@v3
- name: Configure git
run: |
P=/home/root/build
mkdir -p $P && cp -r . $P && cd $P
git config --global --add safe.directory $P
git config --global user.email ${GIT_EMAIL}
git config --global user.name ${GIT_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment