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

DM-48220: Move image push from public lsstsqre dockerhub to lsst-ts GHCR. #29

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 18 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,23 @@ jobs:
id: print
run: echo ${{steps.vars.outputs.tag}}

- name: Log into Docker Hub
run: echo ${{ secrets.DOCKER_TOKEN }} | docker login --username ${{ secrets.DOCKER_USERNAME }} --password-stdin
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Pull previous images
run: |
docker pull lsstsqre/narrativelog:deps-${{steps.vars.outputs.tag}} || true
docker pull lsstsqre/narrativelog:${{steps.vars.outputs.tag}} || true

- name: Build the dependencies Docker image
run: |
docker build --target dependencies-image \
--cache-from=lsstsqre/narrativelog:deps-${{steps.vars.outputs.tag}} \
--tag lsstsqre/narrativelog:deps-${{steps.vars.outputs.tag}} .

- name: Build the runtime Docker image
run: |
docker build --target runtime-image \
--cache-from=lsstsqre/narrativelog:${{steps.vars.outputs.tag}} \
--tag lsstsqre/narrativelog:${{steps.vars.outputs.tag}} .
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker images
run: |
docker push lsstsqre/narrativelog:deps-${{steps.vars.outputs.tag}}
docker push lsstsqre/narrativelog:${{steps.vars.outputs.tag}}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
ghcr.io/lsst-ts/narrativelog:${{ steps.vars.outputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
Loading