Merge pull request #9 from tryiou/Unobtanium-UNO #19
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: plugin-adapter docker image | |
on: [push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
tag: latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Login to DockerHub | |
run: echo ${{ secrets.org_blocknetdximg_password }} | docker login --username ${{ secrets.org_blocknetdximg_username }} --password-stdin | |
- name: Image info | |
run: echo Building ${{ github.workflow }} ${{ github.ref_name }} | |
- name: Set tag to branch name if not on master (now called main) | |
if: github.ref_name != 'main' | |
run: echo "tag=${{ github.ref_name }}" >> $GITHUB_ENV | |
- name: Build an image | |
run: docker build . --file Dockerfile --tag blocknetdx/plugin-adapter:${{ env.tag }} | |
- name: Push image | |
run: docker push blocknetdx/plugin-adapter:${{ env.tag }} | |
- name: Remove dangling images | |
if: ${{ always() }} | |
run: yes | docker image prune |