Skip to content

DEV-5380 Change go test image to handle new and old version of the runner #25

DEV-5380 Change go test image to handle new and old version of the runner

DEV-5380 Change go test image to handle new and old version of the runner #25

name: 🌳 On Branch - Build and Test Docker Image
on:
pull_request:
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 Go tests Docker image
run: |
docker build . --file Dockerfile --tag ghcr.io/01-edu/test-go:PR${{ github.event.pull_request.number }}
docker push ghcr.io/01-edu/test-go:PR${{ github.event.pull_request.number }}