From 7b106be2b1c79e769e7bbf65d48a39c45ccf425f Mon Sep 17 00:00:00 2001 From: Ethan Ruszanowski Date: Thu, 15 Feb 2024 16:45:42 -0500 Subject: [PATCH] Update build and push workflow --- .github/workflows/build-and-push.yml | 42 +++++++++++++--------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/build-and-push.yml b/.github/workflows/build-and-push.yml index 9c44481..8f74a87 100644 --- a/.github/workflows/build-and-push.yml +++ b/.github/workflows/build-and-push.yml @@ -1,4 +1,5 @@ name: Build and Push to git.beans.team + on: push: branches: @@ -6,32 +7,27 @@ on: tags: - '*' -jobs: - build: - name: Build and Push Image - runs-on: ubuntu-20.04 - +jobs: + update-registry: + name: Update Registry Image + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v4 - - name: Build Image - id: build-image - uses: redhat-actions/buildah-build@v2 + - name: Login to git.beans.team + uses: docker/login-action@v3 with: - image: git.beans.team/em/scouter - tags: latest ${{ github.sha }} - containerfiles: | - ./Containerfile - - - name: Push to git.beans.team - id: push-to-reg - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tags }} - registry: git.beans.team/em + registry: git.beans.team username: em password: ${{ secrets.REGISTRY_PASSWORD }} - - name: Print Image URL - run: echo "Image pushed to ${{ steps.push-to-reg.outputs.registry-paths }}" + - name: Build and Push Image + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile + push: true + tags: | + git.beans.team:latest + git.beans.team:${{ github.sha }}