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

feat: build and push new prebuilt docker image #225

Closed
wants to merge 6 commits into from
Closed

feat: build and push new prebuilt docker image #225

wants to merge 6 commits into from

Conversation

sammcj
Copy link
Collaborator

@sammcj sammcj commented Dec 15, 2022

Summary of changes

Fix for #163

  • Build, label, tag and publish Docker image to Githubs image repository.
  • Simplify the Actions Dockerfile to pull the built image.
  • (Fixes auth issues faced last PR! feat: pre-build dockerfile #201)
  • Add missing .gitignore (how did the project never have one?!).
  • Use standard ubuntu-latest as this is what Github recommend now.

Do any of the followings changes break current behaviour or configuration?

  • No

How changes have been tested

  • I've forked the repo and done the build and publish.
  • Tested I'm able to pull the build image locally.

Note that tests on this PR won't pass as they're run from the main branch that doesn't yet have the ghcr image:

image

List any unknowns

  • I haven't tested the changes in this repo.
    • I don't know what package permissions @anothrNick has setup on this repo, if it's default I believe public repos have public packages.

Once merged, the Action should be tested to ensure it's operating the same.

@sammcj sammcj requested a review from sbe-arg December 15, 2022 22:45
@sammcj sammcj self-assigned this Dec 15, 2022
@sammcj sammcj marked this pull request as ready for review December 15, 2022 22:45
@sammcj
Copy link
Collaborator Author

sammcj commented Dec 15, 2022

@sbe-arg it might be good for you to also pull this and test it with whatever methods you've used in the past as well 👍

@sbe-arg
Copy link
Collaborator

sbe-arg commented Dec 15, 2022

Ill try to test this later today. I did similar work in another repo last week XD

Copy link

@miguelaferreira miguelaferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a maintainer, just an interested user.

I'm very excited about this PR, not having to build the action on every workflow execution will speed things up, and make for more reliable and predictable workflows.

I do have a question about versioning. In this PR the Dockerfile pulls latest, and I'm wondering if that will play well with explicit versions.

.github/workflows/build-docker-image.yml Outdated Show resolved Hide resolved
Dockerfile Outdated

RUN apk --no-cache add bash git curl jq && npm install -g semver
# hadolint ignore=DL3007
FROM ghcr.io/anothrnick/github-tag-action:latest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How will this play out with versioning of the action? When a user just declares the action like this

- name: Bump version and push tag
  uses: anothrNick/github-tag-action@1.55.0 # Don't use @master unless you're happy to test the latest version
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    WITH_V: true

Will GHA build version 1.55.0 of the action? Or will it be ghcr.io/anothrnick/github-tag-action:latest?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't retro build all past tags as images they will be built on demand by the local workflow

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And moving forward the tagged images will be available?

Co-authored-by: Miguel Ferreira <miguelferreira@me.com>
@sammcj
Copy link
Collaborator Author

sammcj commented May 21, 2023

Whoops fell behind on this PR, way too much going on at the mo. I'll try to get back to it maybe late this week.

The call out about versioning mentioned above is warranted. Might need to do some tweaks.

@sammcj sammcj marked this pull request as draft May 21, 2023 13:05
@CattleDip CattleDip closed this by deleting the head repository Jun 14, 2023
@sbe-arg sbe-arg mentioned this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants