Skip to content

Commit

Permalink
github: authenticate earlier for Mac deployment
Browse files Browse the repository at this point in the history
Authenticate earlier and unlock MacOS keychain so that the rest of the
job can access dockerhub.

Also unlock MacOS keychain on normal builds. It looks like if
credentials are present, docker wants to access them.

Signed-off-by: Gerwin Klein <[email protected]>
  • Loading branch information
lsf37 committed May 14, 2024
1 parent a46d494 commit 867f29a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
name: Docker images (ARM64)
runs-on: [self-hosted, macos, ARM64]
steps:
- name: "Unlock MacOS Keychain"
run: security unlock-keychain -p ${{secrets.M2_MINI_PWD}}
- uses: actions/checkout@v4
# don't use cached images on the self-hosted runner to make sure we are
# picking up current Debian repo state. The GitHub runners start from
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/docker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ jobs:
TAG: ${{ needs.tag.outputs.tag }}
SNAPSHOT_DATE: ${{ needs.tag.outputs.snapshot_date }}
steps:
- name: Authenticate
if: ${{ github.repository_owner == 'seL4' }}
run: |
security unlock-keychain -p ${{secrets.M2_MINI_PWD}}
echo ${{secrets.DOCKER_TOKEN}} | docker login -u ${{secrets.DOCKER_USER}} --password-stdin
- uses: actions/checkout@v4
- name: "Build trustworthysystems/sel4"
run: |
Expand All @@ -100,10 +106,6 @@ jobs:
docker tag trustworthysystems/camkes-cakeml-rust:latest \
trustworthysystems/camkes-cakeml-rust:${TAG}-arm64
- name: Authenticate
if: ${{ github.repository_owner == 'seL4' }}
run: docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_TOKEN}}

- name: "Push trustworthysystems/sel4"
if: ${{ github.repository_owner == 'seL4' }}
run: |
Expand Down

0 comments on commit 867f29a

Please sign in to comment.