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

chore: update actions #546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
node: ['20']
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node }}'
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: node_modules
Expand All @@ -34,11 +34,11 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: node_modules
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Docs
run: cd docs && zip -r ../gh-pages _site/
- name: Archive Artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
Expand Down
92 changes: 46 additions & 46 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,54 +9,54 @@ jobs:
image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: builder-image
run: |
set -euxo pipefail
- uses: actions/checkout@v4
- name: builder-image
run: |
set -euxo pipefail

img=ghcr.io/getsentry/craft-builder:latest
args=()
if docker pull -q "$img"; then
args+=(--cache-from "$img")
fi
docker buildx build \
"${args[@]}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--target builder \
--tag "$img" \
.
- name: image
run: |
set -euxo pipefail
img=ghcr.io/getsentry/craft-builder:latest
args=()
if docker pull -q "$img"; then
args+=(--cache-from "$img")
fi
docker buildx build \
"${args[@]}" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--target builder \
--tag "$img" \
.
- name: image
run: |
set -euxo pipefail

img=ghcr.io/getsentry/craft:latest
args=()
if docker pull -q "$img"; then
args+=(--cache-from "$img")
fi
docker buildx build \
"${args[@]}" \
--build-arg "SOURCE_COMMIT=$GITHUB_SHA" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag "$img" \
.
- name: docker login
run: docker login --username "$DOCKER_USER" --password-stdin ghcr.io <<< "$DOCKER_PASS"
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PASS: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: docker push
run: |
set -euxo pipefail
img=ghcr.io/getsentry/craft:latest
args=()
if docker pull -q "$img"; then
args+=(--cache-from "$img")
fi
docker buildx build \
"${args[@]}" \
--build-arg "SOURCE_COMMIT=$GITHUB_SHA" \
--build-arg BUILDKIT_INLINE_CACHE=1 \
--tag "$img" \
.
- name: docker login
run: docker login --username "$DOCKER_USER" --password-stdin ghcr.io <<< "$DOCKER_PASS"
env:
DOCKER_USER: ${{ github.actor }}
DOCKER_PASS: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name != 'pull_request'
- name: docker push
run: |
set -euxo pipefail

craft_builder=ghcr.io/getsentry/craft-builder:latest
craft_latest=ghcr.io/getsentry/craft:latest
craft_versioned="ghcr.io/getsentry/craft:${GITHUB_SHA}"
craft_builder=ghcr.io/getsentry/craft-builder:latest
craft_latest=ghcr.io/getsentry/craft:latest
craft_versioned="ghcr.io/getsentry/craft:${GITHUB_SHA}"

docker push "$craft_builder"
docker push "$craft_builder"

docker tag "$craft_latest" "$craft_versioned"
docker push "$craft_versioned"
docker push "$craft_latest"
if: github.event_name != 'pull_request'
docker tag "$craft_latest" "$craft_versioned"
docker push "$craft_versioned"
docker push "$craft_latest"
if: github.event_name != 'pull_request'
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ jobs:
name: Lint fixes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- uses: actions/cache@v3
- uses: actions/cache@v4
id: cache
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
name: 'Release a new version'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all commits so we can determine previous version
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1274,12 +1274,12 @@ Here is how you can integrate your GitHub project with `craft`:
- 'release/**'
```

2. Use the official `actions/upload-artifact@v2` action to upload your assets.
2. Use the official `actions/upload-artifact` action to upload your assets.
Here is an example config (step) of an archive job:

```yaml
- name: Archive Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ github.sha }}
path: |
Expand Down
Loading