Skip to content

Disable test caching #128

Disable test caching

Disable test caching #128

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches:
- "master"
release:
types:
- published
pull_request:
branches:
- "master"
jobs:
all:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get versions
id: versions
run:
sed 's/ /=/' .tool-versions | tee -a "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ steps.versions.outputs.golang }}
- name: Test
run: make test
- name: Build
run: make docker
- name: Push Docker images to GHCR
if: |
success() && github.event_name == 'push' && github.ref == 'refs/heads/master'
run: |
tag="${{ github.ref_name }}"
docker tag httpbun "ghcr.io/${{ github.actor }}/httpbun:$tag"
if [[ $tag == master ]]; then
docker tag httpbun "ghcr.io/${{ github.actor }}/httpbun:latest"
docker tag httpbun "ghcr.io/${{ github.actor }}/httpbun:${{ github.sha }}"
fi
docker login ghcr.io --username "${{ github.actor }}" --password "${{ secrets.GITHUB_TOKEN }}"
docker push --all-tags "ghcr.io/${{ github.actor }}/httpbun"