Skip to content

Commit

Permalink
workflow: Always use github.sha when building
Browse files Browse the repository at this point in the history
Building from a branch results in builds being inconsistent across the
build matrix as they'll potentially be building different revisions.
`metapkg` does not require `SRC_REF` to be a name, it can figure out the
version from a hash just as well.
  • Loading branch information
elprans committed Oct 17, 2024
1 parent 22cab5c commit 927fb37
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 138 deletions.
12 changes: 2 additions & 10 deletions .github/workflows.src/build.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
prep:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.whichver.outputs.branch }}
<% if subdist == "nightly" %>
<% for tgt in targets.linux + targets.macos %>
if_<< tgt.name.replace('-', '_') >>: ${{ steps.scm.outputs.if_<< tgt.name.replace('-', '_') >> }}
Expand All @@ -11,13 +10,6 @@
steps:
- uses: actions/checkout@v4

- name: Determine package version
shell: bash
run: |
branch=${GITHUB_REF#refs/heads/}
echo branch="${branch}" >> $GITHUB_OUTPUT
id: whichver

<% if subdist == "nightly" %>
- name: Determine SCM revision
id: scm
Expand Down Expand Up @@ -93,7 +85,7 @@
- name: Build
uses: edgedb/edgedb-pkg/integration/linux/build/<< plat_id >>@master
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
SRC_REF: "${{ github.sha }}"
PKG_REVISION: "<current-date>"
<%- if subdist != "" %>
PKG_SUBDIST: "<< subdist >>"
Expand Down Expand Up @@ -175,7 +167,7 @@
- name: Build
env:
SRC_REF: "${{ needs.prep.outputs.branch }}"
SRC_REF: "${{ github.sha }}"
<%- if subdist != "nightly" %>
BUILD_IS_RELEASE: "true"
<%- endif %>
Expand Down
56 changes: 24 additions & 32 deletions .github/workflows/dryrun.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 927fb37

Please sign in to comment.