Update build.sh #10
Workflow file for this run
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
name: Build and upload Docker | |
on: | |
push: | |
branches: | |
- git-build | |
jobs: | |
devops: | |
name: Docker image build | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
strategy: | |
matrix: | |
images: | |
- scout | |
steps: | |
- uses: actions/checkout@v2 | |
if: github.event_name == 'push' | |
with: | |
ref: git-build | |
# Build images | |
- name: Build images | |
run: | | |
# Build Image | |
bash ./build.sh ${{ matrix.images }} | |
# Log into image registries | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
with: | |
username: wildmeorg | |
password: ${{ secrets.WBIA_WILDMEBOT_DOCKER_HUB_TOKEN }} | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GHCR_PAT }} | |
- name: Push to Docker Hub (Latest) | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
VERSION=$(echo ${GITHUB_REF} | sed 's#.*/v##') | |
bash ./publish.sh -t latest ${PUBLISH_IMAGES} | |
env: | |
PUBLISH_IMAGES: ${{ matrix.images }} scout | |