Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecations and permissions on workflows #166

Merged
merged 2 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
otp: "25.0"
lint: lint
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.pair.otp}}
elixir-version: ${{matrix.pair.elixir}}

- uses: actions/cache@v2
- uses: actions/cache@v3
with:
path: |
deps
Expand Down
27 changes: 19 additions & 8 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
workflow_dispatch:
schedule:
## Scheduled nightly at 00:23
- cron: '23 0 * * *'
Expand All @@ -20,20 +21,30 @@ jobs:
latest_tag: ${{ steps.latest-tag.outputs.LATEST_TAG }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Get tag used for generated files
id: current-tag
run: |
# check if the file exist before
[[ -f .latest-tag-aws-sdk-go ]] && CURRENT_TAG=$(<.latest-tag-aws-sdk-go) || CURRENT_TAG=''
echo "::set-output name=CURRENT_TAG::${CURRENT_TAG}"
echo "CURRENT_TAG=${CURRENT_TAG}" >> $GITHUB_OUTPUT

- name: Get latest AWS SDK Go tag
uses: octokit/[email protected]
id: latest-tag-request
with:
route: GET /repos/{owner}/{repo}/releases/latest
owner: aws
repo: aws-sdk-go
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set it to the output
id: latest-tag
run: |
wget https://api.github.com/repos/aws/aws-sdk-go/releases/latest
tag_name=$(cat latest | jq -r '.tag_name')
echo "::set-output name=LATEST_TAG::${tag_name}"
echo '${{ steps.latest-tag-request.outputs.data }}' >> latest.json
tag_name=$(cat latest.json | jq -r '.tag_name')
echo "LATEST_TAG=${tag_name}" >> $GITHUB_OUTPUT

generate:
runs-on: ubuntu-20.04
Expand All @@ -50,22 +61,22 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: erlef/setup-beam@v1
with:
otp-version: ${{ env.OTP_VERSION }}
elixir-version: ${{ env.ELIXIR_VERSION }}

- name: Checkout aws/aws-sdk-go (official Go SDK)
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: aws/aws-sdk-go
path: tmp/aws-sdk-go
ref: ${{ env.LATEST_AWS_SDK_GO_TAG }}

- name: Checkout aws-codegen
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: aws-beam/aws-codegen
path: tmp/aws-codegen
Expand Down