Created
May 5, 2022 21:57
-
-
Save octohedron/2bd72d351a918f29c52024c088d63f0b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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