-
Notifications
You must be signed in to change notification settings - Fork 6
Publish Docker Images to GH Packages on merge with main #86
base: main
Are you sure you want to change the base?
Changes from all commits
a47911c
1763d7e
249e16c
93cfdaa
c6735b1
49e792f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build Docker Images & Push to Registry | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build Frontend Docker image | ||
working-directory: ./app | ||
run: | | ||
docker login docker.pkg.github.com -u ${{ secrets.USERNAME }} --password ${{ secrets.GITHUB_TOKEN }} | ||
docker build . --file Dockerfile --tag frontend | ||
docker tag frontend docker.pkg.github.com/googleinterns/major-tom/frontend | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct me if I am wrong but, are these URL's correct? I thought that for pushing to Google's Container Registry you had to prefix your images with the following format:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this pr is about publishing our latest image to the repo not to gcp's container registry |
||
docker push docker.pkg.github.com/googleinterns/major-tom/frontend | ||
- name: Build Backend Docker image | ||
working-directory: ./server | ||
run: | | ||
docker build . --file Dockerfile --tag backend | ||
docker tag backend docker.pkg.github.com/googleinterns/major-tom/backend | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't this tag lost if you don't push it with this tag too? |
||
docker push docker.pkg.github.com/googleinterns/major-tom/backend | ||
- name: Build Keywords Docker image | ||
working-directory: ./services/keywords | ||
run: | | ||
docker build . --file Dockerfile --tag keywords | ||
docker tag keywords docker.pkg.github.com/googleinterns/major-tom/keywords | ||
docker push docker.pkg.github.com/googleinterns/major-tom/keywords | ||
- name: Build Search Docker image | ||
working-directory: ./services/search | ||
run: | | ||
docker build . --file Dockerfile --tag search | ||
docker tag search docker.pkg.github.com/googleinterns/major-tom/search | ||
docker push docker.pkg.github.com/googleinterns/major-tom/search | ||
- name: Build Parser Docker image | ||
working-directory: ./services/parser-database | ||
run: | | ||
docker build . --file Dockerfile --tag parser-database | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am pretty confident you can omit the |
||
docker tag parser-database docker.pkg.github.com/googleinterns/major-tom/parser-database | ||
docker push docker.pkg.github.com/googleinterns/major-tom/parser-database | ||
Comment on lines
+12
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is a cloudbuild yaml? I would leave cloudbuild in the name somewhere if so