Skip to content

Commit

Permalink
test using push
Browse files Browse the repository at this point in the history
  • Loading branch information
SRv6d committed Jul 21, 2024
1 parent f27a33b commit e1bc9de
Showing 1 changed file with 15 additions and 35 deletions.
50 changes: 15 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
---
name: Build

on:
release:
types: [published]
on: push

permissions:
id-token: write
Expand All @@ -15,38 +13,20 @@ env:
COLUMNS: 120

jobs:
build-wheels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v4
- name: Build
run: pdm build
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/anycastd-*
- name: Upload Build Artifacts
run: >-
gh release upload "${GITHUB_REF_NAME}"
dist/anycastd-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-container-image:
needs: build-wheels
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
steps:
- uses: docker/setup-buildx-action@v3

- name: Container Registry Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Container Registry Login
# uses: docker/login-action@v3
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Metadata (tags, labels)
id: meta
Expand All @@ -56,7 +36,7 @@ jobs:

- name: Download Release Wheel
run: >-
gh release download ${GITHUB_REF_NAME}
gh release download v0.1.11
--pattern '*.whl'
--output anycastd.whl
Expand All @@ -65,14 +45,14 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
push: true
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm/v7,linux/arm64

- name: Attest Build Provenance
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
# - name: Attest Build Provenance
# uses: actions/attest-build-provenance@v1
# with:
# subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME}}
# subject-digest: ${{ steps.push.outputs.digest }}
# push-to-registry: true

0 comments on commit e1bc9de

Please sign in to comment.