Merge pull request #140 from adamjsturge/renovate/go-golang.org-x-cry… #208
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Test Docker | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
paths: | |
- "Dockerfile" | |
- "docker-compose.yml" | |
- "go.mod" | |
- "go.sum" | |
- "probe.js" | |
- "src/*" | |
- "*.go" | |
pull_request: | |
branches: [ "main", "dev" ] | |
paths: | |
- "Dockerfile" | |
- "docker-compose.yml" | |
- "go.mod" | |
- "go.sum" | |
- "probe.js" | |
- "src/*" | |
- "*.go" | |
env: | |
# Use docker.io for Docker Hub if empty | |
REGISTRY: docker.io | |
# github.repository as <account>/<repo> | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create .env | |
run: touch .env | |
- name: Build the Docker image | |
run: docker compose -f docker-compose.prod.yml build --no-cache --force-rm | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create .env | |
run: touch .env | |
- name: Test the Docker image | |
run: docker compose -f docker-compose.prod.yml up -d |