Merge pull request #167 from bro-n-bro/162-neutron-v2 #190
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: Docker Image CI | |
on: | |
push: | |
branches: [ "main" ] | |
tags: [ 'v*.*.*' ] | |
# pull_request: | |
# branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: docker login | |
env: | |
DOCKER_USER: ${{secrets.DOCKER_USER}} | |
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
- name: Build and push specify tag | |
run: | | |
echo 'build image: bronbro/spacebox-crawler:${{github.ref_name}}' | |
docker build -t bronbro/spacebox-crawler:${{github.ref_name}} --target=app --build-arg version=${{github.ref_name}} . | |
docker push bronbro/spacebox-crawler:${{github.ref_name}} | |
- name: Build and push latest tag | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: | | |
docker build -t bronbro/spacebox-crawler:latest --target=app --build-arg version=latest . | |
docker push bronbro/spacebox-crawler:latest |