ci(docker): publish multiple docker images, to multiple registries
This commit is contained in:
parent
aa5e748cca
commit
deb51f0e29
|
@ -13,19 +13,33 @@ jobs:
|
||||||
- name: Checkout the repository
|
- name: Checkout the repository
|
||||||
uses: actions/checkout@v3.0.0
|
uses: actions/checkout@v3.0.0
|
||||||
|
|
||||||
|
- name: Get Short Commit SHA
|
||||||
|
run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)"
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v1.14.1
|
uses: docker/login-action@v1.14.1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.DOCKER_USERNAME }}
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v1.14.1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: $GITHUB_REPOSITORY_OWNER
|
||||||
|
password: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
- name: Build and Push Server Docker Image
|
- name: Build and Push Server Docker Image
|
||||||
uses: docker/build-push-action@v2.9.0
|
uses: docker/build-push-action@v2.9.0
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
file: server/Dockerfile
|
file: server/Dockerfile
|
||||||
tags: amruthpillai/reactive-resume:server
|
tags: |
|
||||||
|
amruthpillai/reactive-resume:server-latest
|
||||||
|
amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }}
|
||||||
|
ghcr.io/amruthpillai/reactive-resume:server-latest
|
||||||
|
ghcr.io/amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }}
|
||||||
|
|
||||||
- name: Build and Push Client Docker Image
|
- name: Build and Push Client Docker Image
|
||||||
uses: docker/build-push-action@v2.9.0
|
uses: docker/build-push-action@v2.9.0
|
||||||
|
@ -33,4 +47,8 @@ jobs:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
file: client/Dockerfile
|
file: client/Dockerfile
|
||||||
tags: amruthpillai/reactive-resume:client
|
tags: |
|
||||||
|
amruthpillai/reactive-resume:client-latest
|
||||||
|
amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }}
|
||||||
|
ghcr.io/amruthpillai/reactive-resume:client-latest
|
||||||
|
ghcr.io/amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }}
|
||||||
|
|
|
@ -35,7 +35,7 @@ RUN apt-get update \
|
||||||
&& apt-get install -y curl g++ make \
|
&& apt-get install -y curl g++ make \
|
||||||
&& curl -sL https://deb.nodesource.com/setup_16.x | bash \
|
&& curl -sL https://deb.nodesource.com/setup_16.x | bash \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& npx playwright install-deps chromium
|
&& PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npx playwright install-deps chromium
|
||||||
|
|
||||||
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
|
RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue