Skip to content

Commit

Permalink
feat(buil-master): add action to build and push docker image to registry
Browse files Browse the repository at this point in the history
- use prebuilt image to run GH action to improve performance
  • Loading branch information
nprimo committed Aug 21, 2024
1 parent 3eacafd commit dba0761
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/ga-image-build-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🐳 On Master - Build and Push Docker Image

on:
push:
branches: ["master"]

jobs:
build-image:
name: 🏗️ Build Image
runs-on: ubuntu-latest

steps:
- name: 🐧 Checkout
uses: actions/checkout@v3
- name: 📦 Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: 🐳 Login to docker.01-edu.org Registry
uses: docker/login-action@v2
with:
registry: docker.01-edu.org
username: ${{ secrets.USER_DOCKER_01EDU_ORG }}
password: ${{ secrets.SECRET_DOCKER_01EDU_ORG }}
- name: 🏗️ Build the Check-Links Docker image
run: |
docker build . --file Dockerfile --tag ghcr.io/01-edu/check-links:latest
docker push ghcr.io/01-edu/check-links:latest
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ inputs:
#required: false
runs:
using: docker
image: Dockerfile
image: ghcr.io/01-edu/check-links:latest

0 comments on commit dba0761

Please sign in to comment.