Build G3W-SUITE image #1049
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
## | |
# DOCKER BUILD: Dockerfile.g3wsuite.dockerfile | |
## | |
name: Build G3W-SUITE image | |
on: | |
push: | |
branches: | |
- dev | |
schedule: | |
- cron: "0 4 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- | |
name: Extract branch name | |
shell: bash | |
run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
- | |
name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- | |
name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- | |
name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./Dockerfile.g3wsuite.dockerfile | |
push: true | |
tags: g3wsuite/g3w-suite:${{ env.BRANCH_NAME }} | |
- | |
name: Image digest | |
run: echo ${{ steps.docker_build.outputs.digest }} |