Created
October 6, 2020 18:31
-
-
Save piotrpersona/e08a1e88dcb64e2fadf475cd221125b9 to your computer and use it in GitHub Desktop.
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: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: azure/docker-login@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_SECRET }} | |
- name: Upload docker image | |
run: | | |
IMAGE=$GITHUB_REPOSITORY | |
TAG=$GITHUB_SHA-$GITHUB_RUN_ID | |
docker build -t $IMAGE:$TAG . | |
docker push $IMAGE:$TAG | |
docker tag $IMAGE:$TAG $IMAGE:latest | |
docker push $IMAGE:latest | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
docker tag $IMAGE:$TAG $IMAGE:$BRANCH | |
docker push $IMAGE:$BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment