Skip to content

Commit

Permalink
Revert "Enable buildx support" (#345)
Browse files Browse the repository at this point in the history
* Revert "Enable buildx support (#344)"

This reverts commit 6cba5be.

* Fix buildx
  • Loading branch information
djperrefort authored Jul 16, 2024
1 parent 6cba5be commit 5c7f283
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 96 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,27 @@ jobs:
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Publish image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/arm64,linux/amd64
platforms: linux/amd64,linux/arm64

publish-pypi:
name: Python Distribution
Expand Down
128 changes: 36 additions & 92 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,43 @@
name: 🤖 Publish Package
name: 🎯 Release

on:
workflow_call:
inputs:
version:
description: 'Set the version number of the published application.'
default: '0.0.0'
required: false
type: string
release:
types: [ "released" ]

jobs:
publish-docker:
runs-on: ubuntu-latest
name: Docker Image

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Fetch image artifact
uses: actions/download-artifact@v4
with:
name: keystone-api-docker
path: /tmp

- name: Load image
run: docker load --input /tmp/keystone-api.tar

- name: Define Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/keystone-api
tags: |
type=semver,pattern={{version}}
type=raw,value=latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
env:
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/keystone-api

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Publish image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

publish-pypi:
name: Python Distribution
jobs:
version:
name: Get Release Version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}

steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: false

- name: Fetch build artifact
uses: actions/download-artifact@v4
with:
name: keystone-api-python
path: dist

- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true
user: ${{ secrets.REPO_USER }}
password: ${{ secrets.REPO_PASSWORD }}

trigger-docs:
name: Trigger Docs
runs-on: ubuntu-latest
steps:
- name: Update docs
uses: pitt-crc/keystone-docs/.github/actions/update-action/@main
with:
keystone-gitops-id: ${{ secrets.KEYSTONE_GITOPS_ID }}
keystone-gitops-pk: ${{ secrets.KEYSTONE_GITOPS_PK }}
repo-name: keystone-api
tag: v${{ inputs.version }}
- name: Determine version from release tag
id: get_version
run: |
release_tag=${{github.ref}}
version="${release_tag#refs/tags/v}"
echo "version=$version" >> "$GITHUB_OUTPUT"
build:
name: Build
needs: version
uses: ./.github/workflows/Build.yml
with:
version: ${{needs.version.outputs.version}}

test:
name: Test
needs: build
uses: ./.github/workflows/Test.yml

publish:
name: Publish
needs: [ version, test ]
uses: ./.github/workflows/Publish.yml
secrets: inherit
with:
version: ${{needs.version.outputs.version}}

0 comments on commit 5c7f283

Please sign in to comment.