Skip to content

Commit

Permalink
Build newman
Browse files Browse the repository at this point in the history
  • Loading branch information
reachfh committed Jan 2, 2024
1 parent 0cf895f commit a37d7d3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -697,12 +697,15 @@ jobs:
build-newman:
name: Build newman image
permissions:
# Cancel previous runs
actions: write
contents: read
# Push to ghcr.io repository
packages: write
# Cancel previous runs
actions: write
runs-on: ubuntu-latest
environment: ${{ (github.ref_name == 'main' && 'staging') || (github.ref_name == 'qa' && 'qa') || (github.ref_name == 'prod' && 'production') }}
env:
DOCKER_FILE: deploy/newman.Dockerfile
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
Expand All @@ -713,29 +716,29 @@ jobs:
uses: actions/checkout@v4

- name: Log in to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Pull public images without rate limits
# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker buildx
id: buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host

- name: Build newman image
uses: docker/build-push-action@v3
- name: Build newman image and push to GHCR
uses: docker/build-push-action@v5
with:
file: deploy/newman.Dockerfile
file: ${{ env.DOCKER_FILE }}
context: .
builder: ${{ steps.buildx.outputs.name }}
push: true
Expand Down

0 comments on commit a37d7d3

Please sign in to comment.