-
Notifications
You must be signed in to change notification settings - Fork 188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2nd draft of workflow #2775
2nd draft of workflow #2775
Conversation
|
||
push: | ||
branches: | ||
- master |
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.
Can you try to change this to the name of the branch you're using and check if this works on your fork?
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 see you closed this, but wanted to give some feedback. It's looking pretty close. Nice work.
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: src\api\feed-discovery |
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.
Prefer Unix style paths src/api/feed-discovery
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build and push | ||
id: docker_build |
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 don't think we need an id
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: |
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.
Let's also include buildx
, which gives us some benefits when building multi-stage builds:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
See https://docs.docker.com/buildx/working-with-buildx/ for more info.
context: src\api\feed-discovery | ||
dockerfile: Dockerfile | ||
push: true | ||
tags: user/app:latest |
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.
Let's tag this slightly different, so we update the latest
tag for feed-discovery
to this new image:
tags: feed-discovery:latest
I also wonder if we should use feed-discovery:${{github.sha}}
later on. But we can add that if we need to go back in time to get old versions.
@@ -0,0 +1,26 @@ | |||
name: build-and-push-feed-discovery | |||
|
|||
on: |
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.
We could probably add a path section in here to isolate this to changes in src/api/feed-discovery
only. cc @menghif, who just did this for our docs workflows.
Issue This PR Addresses
Part Of: #1743
Type of Change
Description
This is an attempt to add a workflow that will build and push our microservice image to the GitHub Container Registry. I am unsure of a couple of lines that I will make a comment on.
I also do not know how I would test locally. Would I not have to test it right in staging in order for the workflow to trigger?