Skip to content

chore: Upgrade Python requirements (#2591) #1104

chore: Upgrade Python requirements (#2591)

chore: Upgrade Python requirements (#2591) #1104

name: Build and Push Docker Images
on:
push:
branches:
- master
tags:
- open-release/*
jobs:
push:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v4
# Use the release name as the image tag if we're building an open release tag.
# Examples: if we're building 'open-release/maple.1', tag the image as 'maple.1'.
# Otherwise, we must be building from a push to master, so use 'latest'.
- name: Get tag name
id: get-tag-name
uses: actions/github-script@v7
with:
script: |
const releasePrefix = 'refs/tags/open-release/';
const tagName = context.ref.split(releasePrefix)[1] || 'latest';
console.log('Will use tag: ' + tagName);
return tagName;
result-encoding: string
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push base Docker image
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
target: base
repository: openedx/credentials
tags: |
openedx/credentials:${{ steps.get-tag-name.outputs.result }}
openedx/credentials:${{ github.sha }}
platforms: linux/amd64,linux/arm64
- name: Build and push dev Docker image
uses: docker/build-push-action@v6
with:
push: ${{ github.event_name != 'pull_request' }}
target: dev
repository: openedx/credentials-dev
tags: |
openedx/credentials-dev:${{ steps.get-tag-name.outputs.result }}
openedx/credentials-dev:${{ github.sha }}
platforms: linux/amd64,linux/arm64