diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5b51d62 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,26 @@ +name: build + +on: + push: + branches: "*" + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + go-version: [1.13.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@master + with: + fetch-depth: 1 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: build + run: make build diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..832f9d1 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,42 @@ +name: publish + +on: + push: + tags: + - '*' + +jobs: + publish: + strategy: + matrix: + go-version: [1.13.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@master + with: + fetch-depth: 1 + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Get TAG + id: get_tag + run: echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} + + - name: build + run: make build + env: + TAG: ${{ steps.get_tag.outputs.TAG }} + + - name: Login to Docker Registry + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + registry: ghcr.io + + - name: push manifest + run: make push manifest + env: + TAG: ${{ steps.get_tag.outputs.TAG }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 373d8f2..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -sudo: required - -language: go - -go: - - 1.11.x - -services: - - docker - -addons: - apt: - packages: - - docker-ce - -install: - - echo "Please don't go get" - -script: - - TAG=${TRAVIS_TAG:-latest} make build - -before_deploy: -- echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin - -deploy: - provider: script - script: TAG=$TRAVIS_TAG make push manifest - on: - tags: true diff --git a/Makefile b/Makefile index 27e7e8d..33b1ee3 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -DOCKER_REPOSITORY=openfaas/queue-worker +DOCKER_REPOSITORY=ghcr.io/openfaas/queue-worker BUILD_ARGS=--build-arg http_proxy="${http_proxy}" --build-arg https_proxy="${https_proxy}" ARCHS=amd64 arm64 armhf ppc64le TAG?=latest diff --git a/README.md b/README.md index 7d4b476..319a14e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## queue-worker for NATS Streaming [![Go Report Card](https://goreportcard.com/badge/github.com/openfaas/nats-queue-worker)](https://goreportcard.com/badge/github.com/openfaas/nats-queue-worker) -[![Build Status](https://travis-ci.com/openfaas/nats-queue-worker.svg?branch=master)](https://travis-ci.com/openfaas/nats-queue-worker) +[![Build Status](https://github.com/openfaas/nats-queue-worker/workflows/build/badge.svg?branch=master)](https://github.com/openfaas/nats-queue-worker/actions) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/openfaas/nats-queue-worker?tab=overview) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) @@ -10,7 +10,7 @@ The queue-worker processes asynchronous function invocation requests, you can read more about this in the [async documentation](https://docs.openfaas.com/reference/async/) -Docker Hub image: [openfaas/queue-worker](https://hub.docker.com/r/openfaas/queue-worker/) +Github Container Registry image: [openfaas/queue-worker](https://github.com/orgs/openfaas/packages/container/package/queue-worker) License: MIT