Skip to content

Add tag removal logic of NLB resource #15

Add tag removal logic of NLB resource

Add tag removal logic of NLB resource #15

# This workflow performs continuous integration (CI).
# This workflow will build the container image for amd64 arch. (as a basic build test)
name: Continuous Integration (CI)
on:
# On pull-request event with detailed condition below.
pull_request:
branches:
- master
paths-ignore:
- "**.md"
- ".all-contributorsrc"
- ".gitignore"
- "LICENSE"
- "CODEOWNERS"
jobs:
# The job key (i.e., ID) is "build-source-code"
build-source-code:
# Job name is "Building source code"
# This job runs on Ubuntu-latest (Ubuntu 22.04 LTS checked on 2023-12-13)
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
name: Build source code
strategy:
matrix:
go-version: ["1.23"]
os: [ubuntu-22.04]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
# Cache Go modules
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{matrix.go-version}}
- name: Install swag CLI
run: go install github.com/swaggo/swag/cmd/swag@v1.16.3
- name: Build
run: make
# - name: Test
# run: go test -v ./...
# The job key is "build-container-image"
build-container-image:
# Job name is "Build a container image"
name: Build a container image
# This job runs on Ubuntu-latest (Ubuntu 22.04 LTS checked on 2023-12-13)
# See https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
runs-on: ubuntu-22.04
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
# Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Cache Docker layers
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-
- name: Build image
env:
IMAGE_NAME: ${{ github.event.repository.name }}
run: |
docker buildx build --file Dockerfile --tag $IMAGE_NAME \
--cache-from=type=local,src=/tmp/.buildx-cache \
--cache-to=type=local,dest=/tmp/.buildx-cache \
--load .