Build and push copybara docker image #60
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 push copybara docker image | |
on: | |
push: | |
schedule: | |
- cron: "0 1 * * *" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout google/copybara master | |
uses: actions/checkout@v2 | |
with: | |
repository: google/copybara | |
ref: master | |
- name: Login to github docker registry | |
run: docker login -u $USER -p $TOKEN | |
env: | |
USER: ${{ secrets.DOCKER_HUB_USERNAME }} | |
TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build copybara docker image | |
run: | | |
docker build -t copybara . | |
- name: Tag copybara docker images | |
run: | | |
docker tag copybara gobeyondidentity/copybara:latest | |
docker tag copybara gobeyondidentity/copybara:$(git rev-parse HEAD) | |
- name: Push copybara docker images | |
run: | | |
docker push gobeyondidentity/copybara:latest | |
docker push gobeyondidentity/copybara:$(git rev-parse HEAD) |