Skip to content

Commit

Permalink
temp remove buildReleaseContainers
Browse files Browse the repository at this point in the history
  • Loading branch information
emmastephenson committed Jan 30, 2024
1 parent ef4c4d3 commit 510303f
Showing 1 changed file with 49 additions and 49 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/buildReleaseContainers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
type: string
required: true
workflow_dispatch:
inputs:
container-tag:
type: string
required: true
# inputs:
# container-tag:
# type: string
# required: true

jobs:
list-containers:
Expand All @@ -22,53 +22,53 @@ jobs:
strategy:
matrix:
container-to-build: ${{fromJson(needs.list-containers.outputs.containers)}}
permissions:
contents: "read"
id-token: "write"
packages: "write"
steps:
- name: Check Out Changes
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ inputs.container-tag }}
# permissions:
# contents: "read"
# id-token: "write"
# packages: "write"
# steps:
# - name: Check Out Changes
# uses: actions/checkout@v3
# with:
# fetch-depth: 0
# ref: ${{ inputs.container-tag }}

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

- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Log in to the Container registry
# uses: docker/login-action@v2
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
ref: ${{ inputs.container-tag }}
images: ghcr.io/${{ github.repository }}/${{matrix.container-to-build}}
# this sets the version for tags and labels for each of the containers to be
# be the same as the version/tag where the code was pulled from
tags: |
type=semver,pattern={{raw}},value=${{ inputs.container-tag }}
type=ref,event=branch
type=ref,event=tag,pattern={{raw}},value=${{ inputs.container-tag }}
labels: |
org.opencontainers.image.version=${{ inputs.container-tag }}
# - name: Extract metadata (tags, labels) for Docker
# id: meta
# uses: docker/metadata-action@v4
# with:
# ref: ${{ inputs.container-tag }}
# images: ghcr.io/${{ github.repository }}/${{matrix.container-to-build}}
# # this sets the version for tags and labels for each of the containers to be
# # be the same as the version/tag where the code was pulled from
# tags: |
# type=semver,pattern={{raw}},value=${{ inputs.container-tag }}
# type=ref,event=branch
# type=ref,event=tag,pattern={{raw}},value=${{ inputs.container-tag }}
# labels: |
# org.opencontainers.image.version=${{ inputs.container-tag }}

- name: Target phdi release in requirements.txt
working-directory: ./containers/${{matrix.container-to-build}}
run: |
sed 's/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@main/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@${{ inputs.container-tag }}/g' requirements.txt > requirements_new.txt && mv requirements_new.txt requirements.txt
# - name: Target phdi release in requirements.txt
# working-directory: ./containers/${{matrix.container-to-build}}
# run: |
# sed 's/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@main/phdi @ git+https:\/\/github.com\/CDCgov\/phdi.git@${{ inputs.container-tag }}/g' requirements.txt > requirements_new.txt && mv requirements_new.txt requirements.txt

- name: Build and push
uses: docker/build-push-action@v3
with:
context: ./containers/${{matrix.container-to-build}}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# - name: Build and push
# uses: docker/build-push-action@v3
# with:
# context: ./containers/${{matrix.container-to-build}}
# push: true
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit 510303f

Please sign in to comment.