Skip to content

Commit

Permalink
[DEVOPS-3045] Update deprecated github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
svarnau authored Mar 11, 2024
2 parents 31edbce + bc63a83 commit 33c21f5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,43 @@ jobs:

steps:
- name: Setup Go 1.13
uses: actions/setup-go@v1
uses: actions/setup-go@v5
with:
go-version: 1.13.5
cache: false
id: go

- name: Setup Terraform environment
uses: hashicorp/setup-terraform@v1
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 0.12.25
terraform_wrapper: false

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v4
with:
submodules: true

- name: Public IP
id: ip
run: |
echo ::set-output name=ipv4::$( curl https://checkip.amazonaws.com/ )
echo "ipv4=$( curl https://checkip.amazonaws.com/ )" >> "$GITHUB_ENV"
- name: Get dependencies
run: |
cd ./test
go mod download
- name: Setup AWS CLI
uses: aws-actions/configure-aws-credentials@v1
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}

- name: Build
env:
ALLOWED_SOURCES: "${{ steps.ip.outputs.ipv4 }}/32"
ALLOWED_SOURCES: "${ipv4}/32"
run: |
cd ./test
go test -v -timeout 90m yugabyte_test.go
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
if: github.event.client_payload.prerelease == 'false'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Configure git"
run: |
git config user.name 'YugaByte CI'
Expand All @@ -29,19 +29,19 @@ jobs:
exit 1
fi
echo "Extracted the version number '${version_number}'."
echo "::set-output name=yb_version::${version_number}"
echo "yb_version=${version_number}" >> "$GITHUB_ENV"
- name: "Update the version"
id: update-version
continue-on-error: true
run: |
.ci/update-version.sh '${{steps.extract-version.outputs.yb_version}}'
.ci/update-version.sh "${yb_version}"
- name: "Push the changes"
if: steps.update-version.outcome == 'success'
run: |
git status
git diff
git add variables.tf
git commit -m "Update the version to ${{steps.extract-version.outputs.yb_version}}"
git commit -m "Update the version to ${yb_version}"
git push origin ${{ github.ref }}
- name: "Status in case of update-version failure"
if: steps.update-version.outcome == 'failure'
Expand Down

0 comments on commit 33c21f5

Please sign in to comment.