Skip to content
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

Closed
wants to merge 3 commits into from
Closed

2nd draft of workflow #2775

wants to merge 3 commits into from

Conversation

TDDR
Copy link
Contributor

@TDDR TDDR commented Jan 29, 2022

Issue This PR Addresses

Part Of: #1743

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

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?

@TDDR TDDR added type: enhancement New feature or request area: docker area: deployment Production or Staging deployment area: microservices labels Jan 29, 2022
@TDDR TDDR added this to the 2.6 Release milestone Jan 29, 2022
@TDDR TDDR self-assigned this Jan 29, 2022
@gitpod-io
Copy link

gitpod-io bot commented Jan 29, 2022

@manekenpix manekenpix marked this pull request as draft January 29, 2022 20:09
@manekenpix manekenpix changed the title Draft: Initial draft of workflow Initial draft of workflow Jan 29, 2022

push:
branches:
- master
Copy link
Member

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?

@TDDR TDDR changed the title Initial draft of workflow 2nd draft of workflow Jan 31, 2022
@TDDR
Copy link
Contributor Author

TDDR commented Jan 31, 2022

Not really sure why these two commits are trying to be added again.
image

I thought the rebase went fine
image

but the log shows that the new commits got put on top of mine still
image

@TDDR TDDR closed this Jan 31, 2022
Copy link
Contributor

@humphd humphd left a 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
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

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
Copy link
Contributor

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:
Copy link
Contributor

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.

@TDDR TDDR mentioned this pull request Jan 31, 2022
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: deployment Production or Staging deployment area: docker area: microservices type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants