Merge pull request #30 from base2Services/dependabot/pip/sam-cli/aws-… #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sam-cli | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- 'sam-cli/**' | |
- .github/workflows/sam-cli.yaml | |
jobs: | |
build-and-publish-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Repository | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: vars | |
name: set variables from version file in the directory | |
run: | | |
output=$(cat sam-cli/version) | |
echo "::set-output name=version::$output" | |
- name: Build python 3.8 and Push Container Image to GitHub Container Repository | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./sam-cli | |
push: true | |
tags: | | |
ghcr.io/base2services/sam-cli:latest | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }} | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.8 | |
labels: | | |
runnumber=${GITHUB_RUN_ID} | |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY} | |
build-args: | | |
PYTHON_VERSION=3.8 | |
- name: Build python 3.9 and Push Container Image to GitHub Container Repository | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./sam-cli | |
push: true | |
tags: | | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.9 | |
labels: | | |
runnumber=${GITHUB_RUN_ID} | |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY} | |
build-args: | | |
PYTHON_VERSION=3.9 | |
- name: Build python 3.7 and Push Container Image to GitHub Container Repository | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./sam-cli | |
push: true | |
tags: | | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.7 | |
labels: | | |
runnumber=${GITHUB_RUN_ID} | |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY} | |
build-args: | | |
PYTHON_VERSION=3.7 | |
- name: Build python 3.11 and Push Container Image to GitHub Container Repository | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./sam-cli | |
push: true | |
tags: | | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.11 | |
labels: | | |
runnumber=${GITHUB_RUN_ID} | |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY} | |
build-args: | | |
PYTHON_VERSION=3.11 | |
- name: Build python 3.12 and Push Container Image to GitHub Container Repository | |
uses: docker/build-push-action@v3 | |
with: | |
context: ./sam-cli | |
push: true | |
tags: | | |
ghcr.io/base2services/sam-cli:${{ steps.vars.outputs.version }}-py3.12 | |
labels: | | |
runnumber=${GITHUB_RUN_ID} | |
org.opencontainers.image.source=https://github.com/${GITHUB_REPOSITORY} | |
build-args: | | |
PYTHON_VERSION=3.12 |