Github Actions 5 years ago
parent
commit
1ddae688ec
  1. 18
      .github/workflows/DINAR.yml

18
.github/workflows/DINAR.yml

@ -34,10 +34,26 @@ jobs:
echo "DINAR_TOKEN is not set" echo "DINAR_TOKEN is not set"
exit 1 exit 1
fi fi
check-branch:
runs-on: ubuntu-latest
steps:
- name: Check that this branch needs docker images
run: |
REF=${GITHUB_BASE_REF:-${GITHUB_REF}}
BRANCH=${REF##*/}
if ! $( echo "$BRANCH" | grep -E "^(master|[0-9]+\.[0-9]+)(-dev-.+)?$" )
then
echo "This branch is not supposed to be a target of pull requests, so docker image is not needed."
echo "For information check https://github.com/itpp-labs/DINAR/issues/60"
exit 1
fi
rebuild-images: rebuild-images:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: needs:
- check-secret - check-secret
- check-branch
steps: steps:
- name: Checkout Repo - name: Checkout Repo
uses: actions/checkout@v2 uses: actions/checkout@v2
@ -74,7 +90,7 @@ jobs:
CLEAN: false CLEAN: false
COMPILE: false COMPILE: false
with: with:
name: ${{ env.IMAGE_ODOO_BASE }}
name: ${{ env.IMAGE_ODOO }}-base
registry: ${{ env.REGISTRY }} registry: ${{ env.REGISTRY }}
username: ${{ env.REGISTRY_USERNAME }} username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }} password: ${{ env.REGISTRY_PASSWORD }}

Loading…
Cancel
Save