diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00f39ff..ba00863 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,16 +4,6 @@ name: Create and publish a Docker image # Configures this workflow to run every time a change is pushed to the branch called `release`. on: workflow_dispatch: - inputs: - imageTag: - description: 'Set tag for the image' - required: true - default: 'master-ubuntu_jammy' - type: choice - options: - - master-ubuntu_jammy - - 2023.1-ubuntu_jammy - - 2023.2-ubuntu_jammy # Defines two custom environment variables for the workflow. These are used for the Container registry domain, and a name for the Docker image that this workflow builds. env: @@ -24,13 +14,17 @@ env: jobs: build-and-push-image: runs-on: ubuntu-latest + + strategy: + matrix: + openstack: [2023.1, 2023.2, 2024.1] + distro: [ubuntu_jammy] + # Sets the permissions granted to the `GITHUB_TOKEN` for the actions in this job. permissions: contents: read packages: write steps: - - name: Checkout repository - uses: actions/checkout@v4 # Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here. - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 @@ -50,9 +44,9 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: - context: . push: true - tags: "ghcr.io/${{ env.IMAGE_NAME }}:${{ github.event.inputs.imageTag }}" + tags: "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.openstack }}-${{ matrix.distro }}" labels: ${{ steps.meta.outputs.labels }} + annotations: ${{ steps.meta.outputs.annotations }} build-args: | - VERSION=${{ github.event.inputs.imageTag }} + VERSION=${{ matrix.openstack }}-${{ matrix.distro } diff --git a/Dockerfile b/Dockerfile index a0d35ac..f9fa2af 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ ARG VERSION=master-ubuntu_jammy FROM openstackhelm/keystone:$VERSION -RUN /var/lib/openstack/bin/pip install keystone-rxt +RUN /var/lib/openstack/bin/pip install --no-cache-dir keystone-rxt