1
0

containerize & enhance filtering
All checks were successful
Build & Push Docker Image / build-and-publish (push) Successful in 14s

This commit is contained in:
2026-02-08 11:58:22 -05:00
parent 25ef2adf71
commit 312c54c5bd
8 changed files with 608 additions and 19 deletions

View File

@@ -0,0 +1,32 @@
name: Build & Push Docker Image
on: push
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Output Repository Information
run: |
echo This workflow will build and push a Docker image to:
echo ${{ vars.REPO_ADDRESS }}/${{ vars.REPO_USER }}/${{ vars.REPO_NAME }}:latest
echo https://${{ vars.REPO_ADDRESS }}/${{ vars.REPO_USER }}/${{ vars.REPO_NAME }}
- name: Build Docker Image
run: |
docker build -t ${{ vars.REPO_ADDRESS }}/${{ vars.REPO_USER }}/${{ vars.REPO_NAME }}:latest --output type=docker --platform linux/amd64 .
- name: Log in to Container Repo
uses: docker/login-action@v3
with:
username: ${{ vars.REPO_USER }}
registry: ${{ vars.REPO_ADDRESS }}
password: ${{ secrets.REPO_TOKEN }}
- name: Push Docker Image
run: |
echo "Pushing Docker image with tag: latest to ${{ vars.REPO_ADDRESS }}"
docker push ${{ vars.REPO_ADDRESS }}/${{ vars.REPO_USER }}/${{ vars.REPO_NAME }}:latest
docker rmi ${{ vars.REPO_ADDRESS }}/${{ vars.REPO_USER }}/${{ vars.REPO_NAME }}:latest || true