Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not use GH repo for Docker image name #1357

Merged
merged 2 commits into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
TEST_TAG: ${{ github.repository }}:test
IMAGE_NAME: mozilla/poucave
TEST_CONTAINER_NAME: container-healthcheck
steps:
- name: Check out the repo
Expand All @@ -36,7 +36,7 @@ jobs:
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ github.repository }}
images: ${{ env.IMAGE_NAME }}
# https://github.com/marketplace/actions/docker-metadata-action#tags-input
tags: |
type=semver,pattern={{raw}}
Expand All @@ -56,14 +56,14 @@ jobs:
context: .
load: true
push: false
tags: ${{ env.TEST_TAG }}
tags: ${{ env.IMAGE_NAME }}:test

- name: Test from Docker
run: |
docker run \
--name ${{ env.TEST_CONTAINER_NAME }}-test \
--user root \
${{ env.TEST_TAG }} \
${{ env.IMAGE_NAME }}:test \
test

- name: Spin up container
Expand All @@ -73,7 +73,7 @@ jobs:
--detach \
--env CONFIG_FILE=/app/tests/checks/remotesettings/config.toml \
--publish 8000:8000 \
${{ env.TEST_TAG }}
${{ env.IMAGE_NAME }}:test

- name: Check that container is running
run: |
Expand All @@ -89,3 +89,4 @@ jobs:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Loading