Skip to content

Commit 13d53c2

Browse files
authored
Fix failing build (#12)
Signed-off-by: peterdeme <snypox@gmail.com>
1 parent 5307bc3 commit 13d53c2

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

.github/workflows/deploy.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Deploy
22

33
on:
44
push:
5-
branches:
6-
- future
7-
- main
5+
branches: ["main", "future"]
6+
pull_request:
7+
branches: ["main", "future"]
88
schedule:
99
- cron: '20 8 * * 1'
1010

@@ -31,22 +31,24 @@ jobs:
3131

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

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

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

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

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

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

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

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

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

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

base/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ FROM public.ecr.aws/spacelift/runner-terraform
33
USER root
44
WORKDIR /home/spacelift
55

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

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

1212
USER spacelift

0 commit comments

Comments
 (0)