Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 0 additions & 7 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ jobs:
ref: ${{github.head_ref}}
lfs: true

- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: |
${{ secrets.SSH_BC2_DEPLOY_PRIVATE_KEY }}

- name: Set up Terraform
uses: hashicorp/setup-terraform@v3

Expand All @@ -42,7 +36,6 @@ jobs:
- name: Get requirements
working-directory: ${{env.wd}}
run: |
git config --global url."https://x-token-auth:${{ secrets.GH_PAT }}@github.com/".insteadOf "git@github.com:"
uv sync --locked --all-extras --dev

- name: Linting, formatting, and type checking
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,44 +95,9 @@ jobs:
username: blindchargingapi
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: |
${{ secrets.SSH_ALLIGATER_DEPLOY_PRIVATE_KEY }}
${{ secrets.SSH_BC2_DEPLOY_PRIVATE_KEY }}

# The webfactory/ssh-agent step generates a .gitconfig and .ssh/config
# that need to be 1) copied into the build context, and 2) injected into
# the Dockerfile so that the build can access private repositories.
- name: Patch git and ssh in Dockerfile
env:
DIR: ${{github.workspace}}
run: |
mkdir -p custom-config
cp -r ~/.gitconfig ~/.ssh custom-config/
ed -s $DIR/Dockerfile <<EOF
/WORKDIR/
i
COPY custom-config/.gitconfig /root/.gitconfig
COPY custom-config/.ssh /root/.ssh
RUN sed 's|/home/runner|/root|g' -i.bak /root/.ssh/config
.
w
q
EOF
ls -l custom-config/.ssh
cat custom-config/.ssh/config
cat custom-config/.gitconfig

- name: Build and push API image
uses: docker/build-push-action@v6
with:
# Use the configured ssh-agent in the build for private repos.
ssh: default=${{ env.SSH_AUTH_SOCK }}
# Override default context to use the checkout with Dockerfile modifications.
context: ${{github.workspace}}
file: ${{github.workspace}}/Dockerfile
# Apply new version tag, as well as a tag based on release channel.
push: true
tags: blindchargingapi.azurecr.io/blind-charging-api:${{ needs.tag.outputs.api_release_channel }},blindchargingapi.azurecr.io/blind-charging-api:${{ needs.tag.outputs.api_version }}
Comment on lines 95 to 103

This comment was marked as outdated.

Expand Down
38 changes: 2 additions & 36 deletions .github/workflows/research.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,45 +34,11 @@ jobs:
username: blindchargingapi
password: ${{ secrets.AZURE_REGISTRY_PASSWORD }}

- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: |
${{ secrets.SSH_ALLIGATER_DEPLOY_PRIVATE_KEY }}
${{ secrets.SSH_BC2_DEPLOY_PRIVATE_KEY }}

# The webfactory/ssh-agent step generates a .gitconfig and .ssh/config
# that need to be 1) copied into the build context, and 2) injected into
# the Dockerfile so that the build can access private repositories.
- name: Patch git and ssh in Dockerfile
env:
DIR: ${{github.workspace}}
run: |
CONFIG_DIR=terraform/research/custom-config
mkdir -p $CONFIG_DIR
cp -r ~/.gitconfig ~/.ssh $CONFIG_DIR/
ed -s $DIR/terraform/research/Dockerfile <<EOF
/WORKDIR/
i
COPY custom-config/.gitconfig /root/.gitconfig
COPY custom-config/.ssh /root/.ssh
RUN sed 's|/home/runner|/root|g' -i.bak /root/.ssh/config
.
w
q
EOF
ls -l $CONFIG_DIR/.ssh
cat $CONFIG_DIR/.ssh/config
cat $CONFIG_DIR/.gitconfig

- name: Build and push research image
uses: docker/build-push-action@v6
with:
# Use the configured ssh-agent in the build for private repos.
ssh: default=${{ env.SSH_AUTH_SOCK }}
# Override default context to use the checkout with Dockerfile modifications.
context: ${{github.workspace}}/terraform/research
file: ${{github.workspace}}/terraform/research/Dockerfile
context: terraform/research
file: terraform/research/Dockerfile
# Apply new version tag and replace any existing `latest` tag.
push: true
tags: blindchargingapi.azurecr.io/blind-charging-research:latest
Comment on lines 34 to 44

This comment was marked as outdated.

Expand Down
Loading