Skip to content

aswf/ci-package-python:2023.2 #2058

aswf/ci-package-python:2023.2

aswf/ci-package-python:2023.2 #2058

Workflow file for this run

name: Release
on:
release:
types: [created]
jobs:
release:
runs-on: ubuntu-20.04-16c-64g-600h
env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_BUILDKIT: '1'
ARTIFACTORY_USER: ${{ secrets.ARTIFACTORY_USER }}
ARTIFACTORY_TOKEN: ${{ secrets.ARTIFACTORY_TOKEN }}
strategy:
matrix:
group: [docker, conan]
include:
- group: docker
args: ""
build: true
push_description: true
- group: conan
args: --use-conan --conan-login --build-missing
build: ${{ contains(github.ref, '/ci-package') }}
push_description: false
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install aswfdocker and dependencies with pipenv
run: pipenv install
- name: Login to DockerHub
if: ${{ matrix.build }}
run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u aswfdocker --password-stdin
- name: Activate Docker buildx
if: ${{ matrix.build }}
run: |
mkdir -p ~/.docker/cli-plugins
curl --location https://github.com/docker/buildx/releases/download/v0.11.2/buildx-v0.11.2.linux-amd64 -o ~/.docker/cli-plugins/docker-buildx
chmod a+x ~/.docker/cli-plugins/docker-buildx
docker buildx create --name forpushing --use
docker buildx inspect --bootstrap
- name: Build and Push
if: ${{ matrix.build }}
run: |
pipenv run aswfdocker \
--repo-uri $GITHUB_REPOSITORY \
--verbose \
build \
--full-name $GITHUB_REF \
--push YES \
${{ matrix.args }}
- name: Update Docker Hub Description
if: ${{ matrix.push_description }}
run: |
pipenv run aswfdocker \
pushoverview \
--username aswfdocker \
--password ${{ secrets.DOCKERHUB_PASSWORD }} \
--full-name $GITHUB_REF