Skip to content

Commit

Permalink
Fix failing build (#12)
Browse files Browse the repository at this point in the history
Signed-off-by: peterdeme <[email protected]>
  • Loading branch information
peterdeme authored Feb 26, 2024
1 parent 5307bc3 commit 13d53c2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Deploy

on:
push:
branches:
- future
- main
branches: ["main", "future"]
pull_request:
branches: ["main", "future"]
schedule:
- cron: '20 8 * * 1'

Expand All @@ -31,22 +31,24 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900

- name: Install latest AWS CLI
id: install-aws-cli
uses: unfor19/install-aws-cli-action@v1

- name: Login to Amazon ECR
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${REPOSITORY_PATH}
env:
REPOSITORY_PATH: ${{ secrets.PUBLIC_RUNNER_ANSIBLE_ECR_REPOSITORY_URL }}

- name: Log in to GitHub registry
uses: docker/login-action@v3
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down Expand Up @@ -80,16 +82,17 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900

- name: Install latest AWS CLI
id: install-aws-cli
uses: unfor19/install-aws-cli-action@v1

- name: Login to Amazon ECR
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${REPOSITORY_PATH}
env:
REPOSITORY_PATH: ${{ secrets.PUBLIC_RUNNER_ANSIBLE_ECR_REPOSITORY_URL_AWS }}
Expand Down Expand Up @@ -123,16 +126,17 @@ jobs:

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
with:
aws-region: ${{ env.AWS_REGION }}
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 900

- name: Install latest AWS CLI
id: install-aws-cli
uses: unfor19/install-aws-cli-action@v1

- name: Login to Amazon ECR
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/future' }}
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin ${REPOSITORY_PATH}
env:
REPOSITORY_PATH: ${{ secrets.PUBLIC_RUNNER_ANSIBLE_ECR_REPOSITORY_URL_GCP }}
Expand Down
8 changes: 4 additions & 4 deletions base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ FROM public.ecr.aws/spacelift/runner-terraform
USER root
WORKDIR /home/spacelift

RUN apk -U upgrade && apk add --no-cache \
ansible \
py3-pip
# Pinning to 7 for now, will introduce more tags a bit later

RUN pip install ansible-runner
RUN apk -U upgrade && apk add --no-cache gcc py3-pip python3-dev musl-dev libffi-dev && \
pip install ansible==7.* ansible-runner==2.* --break-system-packages && \
apk del python3-dev gcc musl-dev libffi-dev

USER spacelift

0 comments on commit 13d53c2

Please sign in to comment.