Skip to content

Commit

Permalink
fix: token
Browse files Browse the repository at this point in the history
  • Loading branch information
Skylar Simoncelli committed Oct 3, 2024
1 parent 44f68b9 commit fcc123f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 30 deletions.
8 changes: 1 addition & 7 deletions .github/actions/images/build-and-publish-ghcr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,12 @@ runs:
docker build -t substrate-node:${{ inputs.sha }} .
shell: bash

- name: Acquire AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE_ARN_SECRET }}
aws-region: ${{ env.AWS_REGION }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
password: ${{ env.GITHUB_TOKEN }}
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
FORCE_COLOR: 1
Expand Down
43 changes: 20 additions & 23 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
ECR_REGISTRY_SECRET: ${{ secrets.ECR_REGISTRY_SECRET }}
AWS_ROLE_ARN_SECRET: ${{ secrets.AWS_ROLE_ARN_SECRET }}
SSH_KEY: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
CONFIG_TAR: ${{ secrets.EARTHLY_TAR }}

create-draft-release:
permissions:
Expand Down Expand Up @@ -187,28 +186,26 @@ jobs:
# K8S_SERVER: ${{ secrets.K8S_SERVER }}
# K8S_SA_TOKEN: ${{ secrets.K8S_SA_TOKEN }}
#
# build-and-publish-ghcr:
# permissions:
# id-token: write
# contents: write
# needs: staging-preview-tests
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build and Publish to GHCR
# uses: ./.github/actions/images/build-and-publish-ghcr
# with:
# sha: ${{ inputs.sha }}
# tag: ${{ inputs.tag }}
# ssh_key_earthly: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
# config_tar: ${{ secrets.EARTHLY_TAR }}
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# SUBSTRATE_REPO_SSH_KEY: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}
# EARTHLY_TAR: ${{ secrets.EARTHLY_TAR }}
#
build-and-publish-ghcr:
permissions:
id-token: write
contents: write
needs: deploy-staging-preview
#needs: staging-preview-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Publish to GHCR
uses: ./.github/actions/images/build-and-publish-ghcr
with:
sha: ${{ inputs.sha }}
tag: ${{ inputs.tag }}
env:
AWS_REGION: "eu-central-1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSH_KEY: ${{ secrets.SUBSTRATE_REPO_SSH_KEY }}

publish-release:
permissions:
id-token: write
Expand Down

0 comments on commit fcc123f

Please sign in to comment.