Merge pull request #52 from brunofaustino/master #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: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: docker login | |
run: | | |
echo $GCR_TOKEN | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin | |
env: | |
GCR_TOKEN: ${{ secrets.GCR_TOKEN }} | |
- name: build and push latest docker image to GCR | |
run: | | |
docker pull ghcr.io/kciter/aws-ecr-action:latest | |
docker build . --tag ghcr.io/kciter/aws-ecr-action:$GITHUB_SHA --cache-from ghcr.io/kciter/aws-ecr-action:latest | |
docker push ghcr.io/kciter/aws-ecr-action:$GITHUB_SHA |