Build #567
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 | |
on: | |
schedule: | |
- cron: '* 0 * * *' | |
jobs: | |
build: | |
name: Build and push to dockerhub | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASS: ${{ secrets.DOCKER_PASS }} | |
steps: | |
- name: Checkout Dockerfile | |
uses: actions/checkout@v2 | |
- name: Login to Dockerhub | |
run: docker login -u $DOCKER_USER -p $DOCKER_PASS | |
- name: Build master peerswap | |
run: docker build . -t vilm3r/peerswap:latest --build-arg COMMIT=master | |
- name: Push latest to Dockerhub | |
run: docker push vilm3r/peerswap:latest | |
- name: Get most recent tag | |
run: echo "recent_tag=$(curl https://api.github.com/repos/ElementsProject/peerswap/releases/latest -s | grep tag_name | grep -o "v[0-9,.]*")" >> $GITHUB_ENV | |
- name: Build most recent tag | |
run: docker build . -t vilm3r/peerswap:$recent_tag --build-arg COMMIT=$recent_tag | |
- name: Push most recent tag to Dockerhub | |
run: docker push vilm3r/peerswap:$recent_tag |