Skip to content

Commit

Permalink
First attempt at docker push
Browse files Browse the repository at this point in the history
  • Loading branch information
dmerrick committed Jan 15, 2021
1 parent 586c3c1 commit 094e5ef
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,29 @@ jobs:
# run: curl -v https://tripbot:8080/health
# - name: Run test suite
# run: docker exec tripbot go test ./...
- name: push-tagged-version
if: startsWith(github.ref, 'refs/tags/v')
run: |
source Makefile.env
docker tag $CPU_IMAGE $REPO_URI/$REVERIE_REPO:$CPU_IMAGE-$VERSION_TAG
docker push $REPO_URI/$REVERIE_REPO:$CPU_IMAGE-$VERSION_TAG
docker tag $SERVER_IMAGE $REPO_URI/$REVERIE_REPO:$SERVER_IMAGE-$VERSION_TAG
docker push $REPO_URI/$REVERIE_REPO:$SERVER_IMAGE-$VERSION_TAG
push:
name: Push Docker images
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
steps:
#TODO: do I need this?
- id: get-ref
uses: ankitvgupta/ref-to-tag-action@master
with:
ref: ${{ github.ref }}
head_ref: ${{ github.head_ref }}
- name: Push Docker images
env:
VERSION_TAG: ${{ steps.get-ref.outputs.tag }}
run: |
docker-compose --project-directory . --env-file infra/docker/env.docker -f infra/docker/docker-compose.yml -f infra/docker/docker-compose.testing.yml -f infra/docker/docker-compose.github.yml push

0 comments on commit 094e5ef

Please sign in to comment.