Skip to content

Commit

Permalink
Fix master branch workflows.
Browse files Browse the repository at this point in the history
Fix git permissions & upgrade actions.
  • Loading branch information
xnox committed Jul 12, 2023
1 parent 30c931c commit 1288669
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 17 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/auto-updates.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
apt update
DEBIAN_FRONTEND=noninteractive apt install -y gettext git
# Checkout code with git
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: master
# As per https://github.com/actions/runner/issues/2033#issuecomment-1204205989
- name: Set ownership
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
# Install go
- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ env.goversion }}
# Update po if needed
Expand Down Expand Up @@ -75,11 +80,16 @@ jobs:
apt update
DEBIAN_FRONTEND=noninteractive apt -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install libzfslinux-dev git gcc
# Checkout code with git
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: master
# As per https://github.com/actions/runner/issues/2033#issuecomment-1204205989
- name: Set ownership
run: |
# this is to fix GIT not liking owner of the checkout dir
chown -R $(id -u):$(id -g) $PWD
# Install go
- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: ${{ env.goversion }}
# Try updating README
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v3
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
env:
Expand Down
23 changes: 11 additions & 12 deletions .github/workflows/repo-quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- master
pull_request:
paths-ignore:
- '.github/workflows/update-build-containers.yaml'
- '.github/workflows/commands.yaml'
- 'po/*'

Expand All @@ -19,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Install go
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: Code formatting
Expand All @@ -37,7 +36,7 @@ jobs:
runs-on: ubuntu-latest
container: ubuntu:devel
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Add dependencies
- name: Enable proposed
run: |
Expand All @@ -52,7 +51,7 @@ jobs:
apt update
apt install -y ca-certificates gcc libzfslinux-dev
# Install go
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: Building
Expand All @@ -77,9 +76,9 @@ jobs:
apt update
DEBIAN_FRONTEND=noninteractive apt install -y ca-certificates gcc libzfslinux-dev protobuf-compiler gettext git
# Checkout code (using git that we just installed)
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Install go
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: Install go grpc protoc generator
Expand All @@ -97,7 +96,7 @@ jobs:
container: ubuntu:devel
steps:
# Checkout code
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Enable proposed
run: |
sed 's/updates/proposed/' /etc/apt/sources.list > /etc/apt/sources.list.d/proposed.list
Expand All @@ -112,7 +111,7 @@ jobs:
apt update
apt install -y ca-certificates gcc libzfslinux-dev # go vet needs libzfs headers (for cgo analysis)
# Install go
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
- name: Report suspicious constructs
Expand All @@ -124,9 +123,9 @@ jobs:
runs-on: ubuntu-latest
container: ubuntu:devel
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
# Install go
- uses: actions/setup-go@v1
- uses: actions/setup-go@v4
with:
go-version: '1.20.x'
# Add dependencies
Expand Down Expand Up @@ -154,7 +153,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout code
- uses: actions/checkout@v1
- uses: actions/checkout@v3
# Reset env so that apt install golang-go then reads GOROOT with uncompatible local version installed by github
- name: Reset environment without GOROOT
run: sudo sed -i "/GOROOT/d" /etc/environment
Expand Down

0 comments on commit 1288669

Please sign in to comment.