Browse Source

feat(workflow): ci/cd on `master`

pull/1513/head
Harry 1 year ago
parent
commit
0bb361a0ab
  1. 26
      .github/workflows/ga-image-build-master.yml

26
.github/workflows/docker-images.yml → .github/workflows/ga-image-build-master.yml

@ -1,45 +1,45 @@
name: Docker Image CI name: 🐳 On Master - Build and Test Docker Image
on: on:
push: push:
branches: ['master'] branches: ["master"]
pull_request:
branches: ['master']
jobs: jobs:
build: build-image:
name: πŸ—οΈ Build Image
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - name: 🐧 Checkout
uses: actions/checkout@v3
- name: Login to GitHub Container Registry - name: πŸ“¦ Login to GitHub Container Registry
uses: docker/login-action@v1 uses: docker/login-action@v2
with: with:
registry: ghcr.io registry: ghcr.io
username: ${{ github.actor }} username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to docker.01-edu.org Registry - name: 🐳 Login to docker.01-edu.org Registry
uses: docker/login-action@v2.1.0 uses: docker/login-action@v2
with: with:
registry: docker.01-edu.org registry: docker.01-edu.org
username: ${{ secrets.USER_DOCKER_01EDU_ORG }} username: ${{ secrets.USER_DOCKER_01EDU_ORG }}
password: ${{ secrets.SECRET_DOCKER_01EDU_ORG }} password: ${{ secrets.SECRET_DOCKER_01EDU_ORG }}
- name: Build the Sh Docker image - name: πŸ—οΈ Build the πŸ’» Sh Docker image
if: always() if: always()
run: | run: |
docker build sh/tests/ --file sh/tests/Dockerfile --tag ghcr.io/01-edu/test-sh:latest docker build sh/tests/ --file sh/tests/Dockerfile --tag ghcr.io/01-edu/test-sh:latest
docker push ghcr.io/01-edu/test-sh:latest docker push ghcr.io/01-edu/test-sh:latest
- name: Build the JS Docker image - name: πŸ—οΈ Build the πŸš€ JS Docker image
if: always() if: always()
run: | run: |
docker build js/tests/ --file js/tests/Dockerfile --tag ghcr.io/01-edu/test-js:latest docker build js/tests/ --file js/tests/Dockerfile --tag ghcr.io/01-edu/test-js:latest
docker push ghcr.io/01-edu/test-js:latest docker push ghcr.io/01-edu/test-js:latest
- name: Build the DOM Docker image - name: Build the 🧩 DOM Docker image
if: always() if: always()
run: | run: |
docker build . --file dom/Dockerfile --tag ghcr.io/01-edu/test-dom:latest docker build . --file dom/Dockerfile --tag ghcr.io/01-edu/test-dom:latest
Loading…
Cancel
Save