Skip to content

Commit

Permalink
use go 1.22, use new actions
Browse files Browse the repository at this point in the history
  • Loading branch information
BennyThink committed Feb 23, 2024
1 parent c70c3e7 commit a392a49
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/builder.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,51 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Lower case for Docker Hub
id: dh_string
uses: ASzc/change-string-case-action@v1
uses: ASzc/change-string-case-action@v6
with:
string: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}

- name: Lower case for ghcr
id: ghcr_string
uses: ASzc/change-string-case-action@v1
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.event.repository.full_name }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
Expand All @@ -68,4 +68,4 @@ jobs:
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Install Go
uses: actions/setup-go@v2
Expand All @@ -30,4 +30,4 @@ jobs:
uses: softprops/action-gh-release@v1
with:
name: "Internet Archive: Wayback Machine bot"
files: builds/*
files: builds/*
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19.0-alpine as builder
FROM golang:1.22-alpine as builder

RUN apk update && apk add --no-cache make ca-certificates tzdata && mkdir /build
COPY go.mod /build
Expand Down

0 comments on commit a392a49

Please sign in to comment.