Skip to content

Commit

Permalink
split build and pull image in two differents jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Fuix committed Sep 11, 2023
1 parent 8291ba7 commit 7c2bc8f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/docker-image-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Push docker image
name: Build and Push Docker Image

on:
push:
Expand All @@ -13,10 +13,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

# Create Build Push Stop
- name: Login to GitHub
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
run: |
docker build -t julienfuix/argo-cd:latest .
docker push julienfuix/argo-cd:latest
push-docker-image:
runs-on: ubuntu-latest

steps:
- name: Login to GitHub Container Registry
run: docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}

- name: Push Docker image
run: |
docker push julienfuix/argo-cd:latest

0 comments on commit 7c2bc8f

Please sign in to comment.