Rework release workflow to split up image creation #7
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: Dockerfiles Release | ||
on: create | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | ||
cancel-in-progress: true | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
jobs: | ||
if: (github.event_name == 'create' && github.event.ref_type == 'tag') | ||
release-pre-reqs: | ||
name: Release image required by other images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and Push | ||
run: ./build-and-push-images.sh os-core ${{ github.event.ref }} | ||
run: ./build-and-push-images.sh httpd ${{ github.event.ref }} | ||
release-matrix: | ||
name: Release Matrix | ||
strategy: | ||
matrix: | ||
iamge: ['cgit', 'golang', 'haproxy', 'iperf', 'mariadb', 'memcached', 'nginx', 'node', 'numpy-mp', 'perl', 'php', 'php-fpm', 'postgres', 'python', 'rabbitmq', 'r-base', 'redis', 'ruby', 'tesseract-ocr'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Code Checkout | ||
uses: actions/checkout@v4 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and Push | ||
run: ./build-and-push-images.sh ${{ matrix.image }} ${{ github.event.ref }} |