Skip to content

Commit

Permalink
Merge pull request #29 from lsst-ts/tickets/DM-48220
Browse files Browse the repository at this point in the history
DM-48220: Move image push from public lsstsqre dockerhub to lsst-ts GHCR.
  • Loading branch information
sebastian-aranda authored Dec 19, 2024
2 parents d3db8b7 + f4407d2 commit 2769562
Showing 1 changed file with 18 additions and 22 deletions.
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

0 comments on commit 2769562

Please sign in to comment.