mirror of
https://github.com/ethanrusz/scouter.git
synced 2024-11-21 10:57:45 -05:00
Merge pull request #6 from ethanrusz/actions
Update build and push workflow
This commit is contained in:
commit
9864f55e3c
1 changed files with 19 additions and 23 deletions
42
.github/workflows/build-and-push.yml
vendored
42
.github/workflows/build-and-push.yml
vendored
|
@ -1,4 +1,5 @@
|
||||||
name: Build and Push to git.beans.team
|
name: Build and Push to git.beans.team
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
@ -6,32 +7,27 @@ on:
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
update-registry:
|
||||||
name: Build and Push Image
|
name: Update Registry Image
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Image
|
- name: Login to git.beans.team
|
||||||
id: build-image
|
uses: docker/login-action@v3
|
||||||
uses: redhat-actions/buildah-build@v2
|
|
||||||
with:
|
with:
|
||||||
image: git.beans.team/em/scouter
|
registry: git.beans.team
|
||||||
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
|
|
||||||
username: em
|
username: em
|
||||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Print Image URL
|
- name: Build and Push Image
|
||||||
run: echo "Image pushed to ${{ steps.push-to-reg.outputs.registry-paths }}"
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
git.beans.team:latest
|
||||||
|
git.beans.team:${{ github.sha }}
|
||||||
|
|
Loading…
Reference in a new issue