Skip to content

Merge pull request #4 from WoodManGitHub/log #159

Merge pull request #4 from WoodManGitHub/log

Merge pull request #4 from WoodManGitHub/log #159

Workflow file for this run

name: Analysis Bot Actions
on: [push, pull_request]
jobs:
Docker-image:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
if: github.event_name == 'push'
run: |
REF_SLUG=$([ "$GITHUB_REF" = "refs/heads/master" ] && echo "latest" || echo ${GITHUB_REF##*/})
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/analysis-bot:$REF_SLUG .
docker push ${{ secrets.DOCKERHUB_USERNAME }}/analysis-bot:$REF_SLUG