Skip to content

Commit

Permalink
fixed some stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
kessler-frost committed Dec 12, 2023
1 parent fbba184 commit 1ef82f3
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 105 deletions.
209 changes: 105 additions & 104 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
release: ${{ env.RELEASE }}
needs: version_assigner
steps:
- name: Check out stable release tag
uses: actions/checkout@v4
Expand Down Expand Up @@ -150,27 +151,27 @@ jobs:
token: ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
tag: ${{ env.RELEASE }}
prerelease: true
- name: Create stable release
if: >-
github.event.inputs.stable_version
&& contains(env.PAUL_BLART, github.actor)
&& steps.stable-changelog.outcome == 'success'
&& (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
uses: ncipollo/release-action@v1
with:
body: ${{ steps.stable-changelog.outputs.message }}
token: ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
tag: ${{ env.RELEASE }}
- name: Alert Slack
if: failure()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_CHANNEL: "covalent-ci"
SLACK_USERNAME: "CovalentOpsBot"
SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
SLACK_COLOR: ${{ job.status }}
SLACK_TITLE: ":warning: Attention Required :warning:"
SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}
# - name: Create stable release
# if: >-
# github.event.inputs.stable_version
# && contains(env.PAUL_BLART, github.actor)
# && steps.stable-changelog.outcome == 'success'
# && (!github.event.inputs.test_release || github.event.inputs.test_release == 'false')
# uses: ncipollo/release-action@v1
# with:
# body: ${{ steps.stable-changelog.outputs.message }}
# token: ${{ secrets.COVALENT_OPS_BOT_TOKEN }}
# tag: ${{ env.RELEASE }}
# - name: Alert Slack
# if: failure()
# uses: rtCamp/action-slack-notify@v2
# env:
# SLACK_CHANNEL: "covalent-ci"
# SLACK_USERNAME: "CovalentOpsBot"
# SLACK_MESSAGE: "The release.yml workflow is failing in ${{ github.ref }}!"
# SLACK_COLOR: ${{ job.status }}
# SLACK_TITLE: ":warning: Attention Required :warning:"
# SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}

pypi:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -247,97 +248,97 @@ jobs:
SLACK_TITLE: ":warning: Attention Required :warning:"
SLACK_WEBHOOK: ${{ secrets.SLACK_ALERT_WEBHOOK }}

docker:
runs-on: ubuntu-latest
steps:
- name: Check out release tag
uses: actions/checkout@v4
if: inputs.stable_version
with:
persist-credentials: false
fetch-depth: 0
ref: "v${{ github.event.inputs.stable_version }}"
# docker:
# runs-on: ubuntu-latest
# steps:
# - name: Check out release tag
# uses: actions/checkout@v4
# if: inputs.stable_version
# with:
# persist-credentials: false
# fetch-depth: 0
# ref: "v${{ github.event.inputs.stable_version }}"

- name: Check out master
uses: actions/checkout@v4
if: inputs.prerelease
with:
persist-credentials: false
fetch-depth: 0
# - name: Check out master
# uses: actions/checkout@v4
# if: inputs.prerelease
# with:
# persist-credentials: false
# fetch-depth: 0

- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: "linux/amd64,linux/arm64"
# - name: Set up QEMU
# uses: docker/setup-qemu-action@master
# with:
# platforms: "linux/amd64,linux/arm64"

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

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.ECR_PUBLIC_UPLOAD_ROLE }}
aws-region: us-east-1
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: ${{ secrets.ECR_PUBLIC_UPLOAD_ROLE }}
# aws-region: us-east-1

- name: Generate metadata
run: |
aws --version
docker info
TAG="$(cat ./VERSION)"
echo "TAG: $TAG"
echo "TAG=$TAG" >> $GITHUB_ENV
BUILD_DATE=`date -u +%Y-%m-%d`
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
BUILD_VERSION=${{ github.sha }}
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV
# - name: Generate metadata
# run: |
# aws --version
# docker info
# TAG="$(cat ./VERSION)"
# echo "TAG: $TAG"
# echo "TAG=$TAG" >> $GITHUB_ENV
# BUILD_DATE=`date -u +%Y-%m-%d`
# echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
# BUILD_VERSION=${{ github.sha }}
# echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_ENV

- name: Login to Public Registry
run: |
aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
# - name: Login to Public Registry
# run: |
# aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

- name: Build and push pre-release
if: >
inputs.prerelease
&& !inputs.stable_version
&& github.event_name == 'schedule'
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_VERSION=${{ env.BUILD_VERSION }}
push: true
tags: |
public.ecr.aws/covalent/covalent:latest
public.ecr.aws/covalent/covalent:${{ env.TAG }}
# - name: Build and push pre-release
# if: >
# inputs.prerelease
# && !inputs.stable_version
# && github.event_name == 'schedule'
# uses: docker/build-push-action@v2
# with:
# builder: ${{ steps.buildx.outputs.name }}
# context: .
# file: Dockerfile
# platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# build-args: |
# BUILD_DATE=${{ env.BUILD_DATE }}
# BUILD_VERSION=${{ env.BUILD_VERSION }}
# push: true
# tags: |
# public.ecr.aws/covalent/covalent:latest
# public.ecr.aws/covalent/covalent:${{ env.TAG }}

- name: Build and push stable release
if: >
github.event_name == 'workflow_dispatch'
&& inputs.stable_version
&& !inputs.prerelease
&& !github.events.inputs.test_release
&& contains(env.PAUL_BLART, github.actor)
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
context: .
file: Dockerfile
platforms: linux/amd64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BUILD_DATE=${{ env.BUILD_DATE }}
BUILD_VERSION=${{ env.BUILD_VERSION }}
push: true
tags: |
public.ecr.aws/covalent/covalent:${{ inputs.stable_version }}
public.ecr.aws/covalent/covalent:stable
# - name: Build and push stable release
# if: >
# github.event_name == 'workflow_dispatch'
# && inputs.stable_version
# && !inputs.prerelease
# && !github.events.inputs.test_release
# && contains(env.PAUL_BLART, github.actor)
# uses: docker/build-push-action@v2
# with:
# builder: ${{ steps.buildx.outputs.name }}
# context: .
# file: Dockerfile
# platforms: linux/amd64
# cache-from: type=gha
# cache-to: type=gha,mode=max
# build-args: |
# BUILD_DATE=${{ env.BUILD_DATE }}
# BUILD_VERSION=${{ env.BUILD_VERSION }}
# push: true
# tags: |
# public.ecr.aws/covalent/covalent:${{ inputs.stable_version }}
# public.ecr.aws/covalent/covalent:stable

# docker_aws_plugins:
# name: Trigger AWS Plugins Base Executor Image Pre-Release
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.232.0-rc.0
0.233.0-rc.0

0 comments on commit 1ef82f3

Please sign in to comment.