Skip to content

Commit

Permalink
chore(ci): update actions, fix ghcr image name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thom-x committed Apr 15, 2024
1 parent 449a4f4 commit e2f91d3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- uses: haya14busa/action-bumpr@v1
15 changes: 8 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ on:

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: thomx/fr24feed-piaware
DOCKERHUB_IMAGE_NAME: thomx/fr24feed-piaware
GHCR_IMAGE_NAME: ${{ github.repository }}

jobs:
# Run tests.
Expand All @@ -22,13 +23,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: all-buildx-${{ github.sha }}
Expand All @@ -53,13 +54,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: all-buildx-${{ github.sha }}
Expand All @@ -86,8 +87,8 @@ jobs:
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && TAGS=$IMAGE_NAME:latest,ghcr.io/$IMAGE_NAME:latest
[ "$VERSION" != "master" ] && TAGS=$IMAGE_NAME:$VERSION,$IMAGE_NAME:latest,ghcr.io/$IMAGE_NAME:$VERSION,ghcr.io/$IMAGE_NAME:latest
[ "$VERSION" == "master" ] && TAGS=$DOCKERHUB_IMAGE_NAME:latest,ghcr.io/$GHCR_IMAGE_NAME:latest
[ "$VERSION" != "master" ] && TAGS=$DOCKERHUB_IMAGE_NAME:$VERSION,$DOCKERHUB_IMAGE_NAME:latest,ghcr.io/$GHCR_IMAGE_NAME:$VERSION,ghcr.io/$GHCR_IMAGE_NAME:latest
echo TAGS=$TAGS
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build and push
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/pull-request-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: thomx/fr24feed-piaware
DOCKERHUB_IMAGE_NAME: thomx/fr24feed-piaware
GHCR_IMAGE_NAME: ${{ github.repository }}

jobs:
# Run tests.
Expand Down Expand Up @@ -44,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'refs/pull/${{ github.event.issue.number }}/merge'
- name: Get commit
Expand All @@ -56,7 +57,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: all-buildx-${{ steps.get_commit.outputs.sha_short }}
Expand All @@ -80,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: 'refs/pull/${{ github.event.issue.number }}/merge'
- name: Get commit
Expand All @@ -92,7 +93,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: all-buildx-${{ steps.get_commit.outputs.sha_short }}
Expand All @@ -112,7 +113,7 @@ jobs:
- name: Get tags list
id: tags
run: |
TAGS=$IMAGE_NAME:PR-${{ github.event.issue.number }},ghcr.io/$IMAGE_NAME:PR-${{ github.event.issue.number }}
TAGS=$DOCKERHUB_IMAGE_NAME:PR-${{ github.event.issue.number }},ghcr.io/$GHCR_IMAGE_NAME:PR-${{ github.event.issue.number }}
echo TAGS=$TAGS
echo "tags=$TAGS" >> $GITHUB_OUTPUT
- name: Build and push
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: Pull Request
# Run tests for any PRs.
on: pull_request

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: thomx/fr24feed-piaware
PR_NUMBER: ${{ github.event.pull_request.number }}

jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
Expand All @@ -19,13 +14,13 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ matrix.architecture }}-buildx-${{ github.sha }}
Expand Down

0 comments on commit e2f91d3

Please sign in to comment.