Skip to content

Commit

Permalink
feat: build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 1, 2022
1 parent 1cbb235 commit 12dbd06
Show file tree
Hide file tree
Showing 655 changed files with 5,049 additions and 4,957 deletions.
10 changes: 4 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/typescript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
ARG VARIANT="16-bullseye"
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
ARG EXTRA_NODE_VERSION=17
RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node packages
# RUN su node -c "npm install -g <your-package-list -here>"
17 changes: 17 additions & 0 deletions .devcontainer/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 18, 16, 14, 18-bullseye, 16-bullseye, 14-bullseye, 18-buster, 16-buster, 14-buster
ARG VARIANT=18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# Install tslint, typescript. eslint is installed by javascript image
ARG NODE_MODULES="tslint-to-eslint-config typescript"
COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers
RUN su node -c "umask 0002 && npm install -g ${NODE_MODULES}" \
&& npm cache clean --force > /dev/null 2>&1

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
28 changes: 15 additions & 13 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/typescript-node
// https://github.com/microsoft/vscode-dev-containers/tree/v0.238.1/containers/typescript-node
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Update 'VARIANT' to pick a Node version: 18, 16, 14.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local on arm64/Apple Silicon.
"args": {
"VARIANT": "16-bullseye"
"VARIANT": "18-bullseye"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
],
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"dbaeumer.vscode-eslint"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "yarn install",
"onCreateCommand": "brew install act snyk/tap/snyk",
"postCreateCommand": "npm install",
"onCreateCommand": "brew install act",
"postCreateCommand": "sudo apt update && sudo apt full-upgrade -y; npm install",

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,19 @@ on: [pull_request]

env:
RUNNER_TEMP: /tmp
TEST_ARTIFACT_VERSION: 0.7.1
TEST_ARTIFACT_VERSION: 0.8.2

jobs:
local_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3.0.2

- uses: actions/setup-node@v3
with:
node-version-file: .node-version
cache: 'npm'
check-latest: true

- name: Install Dependencies
run: npm ci
Expand All @@ -30,7 +31,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3.0.2

- name: Set up action.yml
run: cp action_ci.yml action.yml
Expand All @@ -53,7 +54,7 @@ jobs:
test_build_then_publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3.0.2

- name: Set up action.yml
run: cp action_ci.yml action.yml
Expand Down Expand Up @@ -81,31 +82,31 @@ jobs:
snapshot:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3.0.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
with:
install: true

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

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4.0.1
with:
images: |
ghcr.io/artis3n/ansible_galaxy_collection-testartifact
tags: |
type=raw,value=SNAPSHOT-${{ github.sha }}
- name: Build and Push
uses: docker/build-push-action@v2.10.0
uses: docker/build-push-action@v3.0.0
with:
context: .
platforms: linux/amd64
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Semver release
uses: technote-space/release-github-actions@v7.1.1
uses: technote-space/release-github-actions@v7.2.4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CLEAN_TARGETS: ''
Expand All @@ -22,22 +22,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3.0.0
- uses: actions/checkout@v3.0.2

- name: Get the version
run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2.0.0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1.6.0
uses: docker/setup-buildx-action@v2.0.0
with:
install: true

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4.0.1
with:
images: |
ghcr.io/${{ env.IMAGE_NAME }}
Expand All @@ -46,14 +46,14 @@ jobs:
type=raw,value=${{ env.RELEASE_VERSION }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v1.14.1
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Push
uses: docker/build-push-action@v2.10.0
uses: docker/build-push-action@v3.0.0
with:
context: .
platforms: linux/amd64, linux/arm64
Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/security.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM node:17-slim AS builder
FROM node:18-slim AS builder

WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . ./
RUN npm run build

FROM node:17-slim AS runner
FROM node:18-slim AS runner

# Required for python inside Docker containers
ENV LC_ALL C.UTF-8
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Ari Kalfus
Copyright (c) 2022 Ari Kalfus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ansible_galaxy_collection

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/artis3n/ansible_galaxy_collection/Testing%20the%20Action)](https://github.com/artis3n/ansible_galaxy_collection/actions)
[![Pipeline](https://github.com/artis3n/ansible_galaxy_collection/actions/workflows/release.yml/badge.svg)](https://github.com/artis3n/ansible_galaxy_collection/actions/workflows/release.yml)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/artis3n/ansible_galaxy_collection)](https://github.com/artis3n/ansible_galaxy_collection/releases)
![GitHub last commit](https://img.shields.io/github/last-commit/artis3n/ansible_galaxy_collection)
![GitHub](https://img.shields.io/github/license/artis3n/ansible_galaxy_collection)
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ inputs:
runs:
using: 'docker'
# Takes ~3 minutes to build the container so speed up consumer invocations by using pre-built image
image: docker://ghcr.io/artis3n/ansible_galaxy_collection:v2.7.0
image: docker://ghcr.io/artis3n/ansible_galaxy_collection:v2.8.0
branding:
icon: 'box'
color: 'purple'
2 changes: 1 addition & 1 deletion fake_collection/galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace: artis3n
name: test_resource_do_not_use
version: 2.7.1
version: 2.8.2
readme: README.md
authors:
- Ari Kalfus (@artis3n) <dev@artis3nal.com>
Expand Down
25 changes: 24 additions & 1 deletion node_modules/@actions/core/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 12dbd06

Please sign in to comment.