Update labels.py #176
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 Deploy containers | |
on: | |
# Always test on pull request | |
pull_request: [] | |
# Deploy on merge to main | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-test-containers: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
# matrix: [tag, path to Dockerfile, label] | |
matrix: | |
dockerfile: [[spack-bot, ./Dockerfile, Spackbot], | |
[spackbot-workers, ./workers/Dockerfile, "Spackbot Workers"]] | |
name: Build ${{matrix.dockerfile[2]}} Container | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build and Run Test Container | |
run: | | |
docker build -f ${{matrix.dockerfile[1]}} -t ghcr.io/spack/${{matrix.dockerfile[0]}}:latest . | |
docker tag ghcr.io/spack/${{matrix.dockerfile[0]}}:latest ghcr.io/spack/${{matrix.dockerfile[0]}}:${GITHUB_SHA::8} | |
- name: Login and Deploy Test Container | |
if: (github.event_name != 'pull_request') | |
run: | | |
docker images | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ secrets.GHCR_USERNAME }} --password-stdin | |
docker push --all-tags ghcr.io/spack/${{matrix.dockerfile[0]}} |